Skip to content

Commit

Permalink
Merge pull request #76 from Jammy2211/feature/iterate_refactor
Browse files Browse the repository at this point in the history
Feature/iterate refactor
  • Loading branch information
Jammy2211 authored Apr 8, 2024
2 parents 1c50a37 + b645306 commit 5c8675e
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
1 change: 0 additions & 1 deletion autocti/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
from .extract.one_d.eper import Extract1DEPER
from .extract.one_d.master import Extract1DMaster
from .layout.one_d import Layout1D
from .dataset_1d.dataset_1d.settings import SettingsDataset1D
from .dataset_1d.dataset_1d.dataset_1d import Dataset1D
from .dataset_1d.dataset_1d.simulator import SimulatorDataset1D
from .dataset_1d.fit import FitDataset1D
Expand Down
2 changes: 1 addition & 1 deletion autocti/charge_injection/imaging/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Tuple


class SettingsImagingCI(aa.SettingsImaging):
class SettingsImagingCI:
def __init__(
self,
parallel_pixels: Tuple[int, int] = None,
Expand Down
1 change: 0 additions & 1 deletion autocti/charge_injection/model/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@


class AnalysisImagingCI(AnalysisCTI):

Result = ResultImagingCI

def __init__(
Expand Down
7 changes: 1 addition & 6 deletions autocti/dataset_1d/dataset_1d/dataset_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import autoarray as aa

from autocti import exc
from autocti.dataset_1d.dataset_1d.settings import SettingsDataset1D
from autocti.extract.settings import SettingsExtract
from autocti.layout.one_d import Layout1D

Expand All @@ -18,10 +17,9 @@ def __init__(
pre_cti_data: aa.Array1D,
layout: Layout1D,
fpr_value: Optional[float] = None,
settings: SettingsDataset1D = SettingsDataset1D(),
settings_dict: Optional[Dict] = None,
):
super().__init__(data=data, noise_map=noise_map, settings=settings)
super().__init__(data=data, noise_map=noise_map)

self.data = data
self.noise_map = noise_map
Expand Down Expand Up @@ -60,9 +58,6 @@ def apply_mask(self, mask: aa.Mask1D) -> "Dataset1D":
settings_dict=self.settings_dict,
)

def apply_settings(self, settings: SettingsDataset1D) -> "Dataset1D":
return self

@classmethod
def from_fits(
cls,
Expand Down
5 changes: 0 additions & 5 deletions autocti/dataset_1d/dataset_1d/settings.py

This file was deleted.

1 change: 0 additions & 1 deletion autocti/dataset_1d/model/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


class AnalysisDataset1D(AnalysisCTI):

Result = ResultDataset1D

def __init__(
Expand Down
16 changes: 14 additions & 2 deletions autocti/model/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@


class Result(result.Result):
def __init__(self, samples_summary, paths=None, samples=None, analysis=None, search_internal = None):
def __init__(
self,
samples_summary,
paths=None,
samples=None,
analysis=None,
search_internal=None,
):
"""
The result of a phase
"""
super().__init__(samples_summary=samples_summary, paths=paths, samples=samples, search_internal=search_internal)
super().__init__(
samples_summary=samples_summary,
paths=paths,
samples=samples,
search_internal=search_internal,
)

self.analysis = analysis

Expand Down
2 changes: 0 additions & 2 deletions test_autocti/aggregator/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def make_model_1d():

@pytest.fixture(name="samples_1d")
def make_samples_1d(model_1d):

parameters = [model_1d.prior_count * [1.0], model_1d.prior_count * [10.0]]

sample_list = Sample.from_lists(
Expand Down Expand Up @@ -93,7 +92,6 @@ def make_model_2d():

@pytest.fixture(name="samples_2d")
def make_samples_2d(model_2d):

parameters = [model_2d.prior_count * [1.0], model_2d.prior_count * [10.0]]

sample_list = Sample.from_lists(
Expand Down
5 changes: 4 additions & 1 deletion test_autocti/charge_injection/model/test_result_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@


def test__fits_to_extracted_and_full_datasets_available(
imaging_ci_7x7, mask_2d_7x7_unmasked, parallel_clocker_2d, samples_summary_with_result
imaging_ci_7x7,
mask_2d_7x7_unmasked,
parallel_clocker_2d,
samples_summary_with_result,
):
imaging_ci_full = copy.deepcopy(imaging_ci_7x7)

Expand Down

0 comments on commit 5c8675e

Please sign in to comment.