project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CAREamics_careamics | _OverlappingPatchedModel | protected | 0 | 1 | overlap_smaller_than_patch_size | def overlap_smaller_than_patch_size(cls, overlaps: Sequence[int] | None, values: ValidationInfo) -> Sequence[int] | None:"""Validate overlap.Overlaps must be smaller than the patch size in each spatial dimension.Parameters----------overlaps : Sequence of intOverlap in each dimension.values : ValidationInfoDictionary of... | 5 | 18 | 3 | 95 | 0 | 38 | 76 | 38 | cls,overlaps,values | [] | Sequence[int] | None | {"Assign": 1, "Expr": 1, "If": 3, "Return": 2} | 9 | 39 | 9 | ["len", "len", "ValueError", "len", "len", "any", "zip", "ValueError", "field_validator"] | 0 | [] | The function (overlap_smaller_than_patch_size) defined within the protected class called _OverlappingPatchedModel, that inherit another class.The function start at line 38 and ends at 76. It contains 18 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [38.0] and does not retu... |
CAREamics_careamics | _OverlappingPatchedModel | protected | 0 | 1 | overlap_even | def overlap_even(cls, overlaps: Sequence[int] | None) -> Sequence[int] | None:"""Validate overlaps.Overlap must be even.Parameters----------overlaps : Sequence of intOverlaps.Returns-------Sequence of intValidated overlap."""if overlaps is None:return Noneif any(o % 2 != 0 for o in overlaps):raise ValueError(f"Overlaps... | 4 | 6 | 2 | 51 | 0 | 80 | 102 | 80 | cls,overlaps | [] | Sequence[int] | None | {"Expr": 1, "If": 2, "Return": 2} | 3 | 23 | 3 | ["any", "ValueError", "field_validator"] | 0 | [] | The function (overlap_even) defined within the protected class called _OverlappingPatchedModel, that inherit another class.The function start at line 80 and ends at 102. It contains 6 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [80.0] and does not return any value. It de... |
CAREamics_careamics | _PatchedModel | protected | 0 | 1 | all_elements_power_of_2_minimum_8 | def all_elements_power_of_2_minimum_8(cls, patch_list: Sequence[int]) -> Sequence[int]:"""Validate patch size.Patch size must be powers of 2 and minimum 8.Parameters----------patch_list : Sequence of intPatch size.Returns-------Sequence of intValidated patch size.Raises------ValueErrorIf the patch size is smaller than ... | 1 | 5 | 2 | 24 | 0 | 29 | 56 | 29 | cls,patch_list | [] | Sequence[int] | {"Expr": 2, "Return": 1} | 2 | 28 | 2 | ["patch_size_ge_than_8_power_of_2", "field_validator"] | 0 | [] | The function (all_elements_power_of_2_minimum_8) defined within the protected class called _PatchedModel, that inherit another class.The function start at line 29 and ends at 56. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [29.0] and does not return any val... |
CAREamics_careamics | SupportedData | public | 0 | 1 | _missing_ | def _missing_(cls, value: object) -> str:"""Override default behaviour for missing values.This method is called when `value` is not found in the enum values. It converts`value` to lowercase, removes "." if it is the first character and tries tomatch it with enum values.Parameters----------value : objectValue to be matc... | 5 | 9 | 2 | 65 | 0 | 33 | 63 | 33 | cls,value | [] | str | {"Assign": 2, "Expr": 1, "For": 1, "If": 3, "Return": 2} | 5 | 31 | 5 | ["isinstance", "value.lower", "lower_value.startswith", "_missing_", "super"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707142_anaconda_platform_anaconda_client.binstar_client.utils.config_py.PackageType._missing_", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.support.supported_data... | The function (_missing_) defined within the public class called SupportedData, that inherit another class.The function start at line 33 and ends at 63. It contains 9 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [33.0] and does not return any value. It declares 5.0 functio... |
CAREamics_careamics | SupportedData | public | 0 | 1 | get_extension_pattern | def get_extension_pattern(cls, data_type: Union[str, SupportedData]) -> str:"""Get Path.rglob and fnmatch compatible extension.Parameters----------data_type : SupportedDataData type.Returns-------strCorresponding extension pattern."""if data_type == cls.ARRAY:raise NotImplementedError(f"Data '{data_type}' is not loaded... | 5 | 11 | 2 | 65 | 0 | 66 | 89 | 66 | cls,data_type | [] | str | {"Expr": 1, "If": 4, "Return": 3} | 2 | 24 | 2 | ["NotImplementedError", "ValueError"] | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.careamist_py.CAREamist.predict_to_disk", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.dataset_utils.file_utils_py.list_f... | The function (get_extension_pattern) defined within the public class called SupportedData, that inherit another class.The function start at line 66 and ends at 89. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [66.0] and does not return any value. It declare... |
CAREamics_careamics | SupportedData | public | 0 | 1 | get_extension | def get_extension(cls, data_type: Union[str, SupportedData]) -> str:"""Get file extension of corresponding data type.Parameters----------data_type : str or SupportedDataData type.Returns-------strCorresponding extension."""if data_type == cls.ARRAY:raise NotImplementedError(f"Data '{data_type}' is not loaded from a fil... | 5 | 11 | 2 | 68 | 0 | 92 | 116 | 92 | cls,data_type | [] | str | {"Expr": 1, "If": 4, "Return": 2} | 3 | 25 | 3 | ["NotImplementedError", "NotImplementedError", "ValueError"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3648110_adblockplus_buildtools.releaseAutomation_py.create_build", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.careamist_py.CAREamist.predict_to_disk", "_.content.gdrive.... | The function (get_extension) defined within the public class called SupportedData, that inherit another class.The function start at line 92 and ends at 116. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [92.0] and does not return any value. It declares 3.0 f... |
CAREamics_careamics | N2VManipulateModel | public | 0 | 1 | odd_value | def odd_value(cls, v: int) -> int:"""Validate that the value is odd.Parameters----------v : intValue to validate.Returns-------intThe validated value.Raises------ValueErrorIf the value is even."""if v % 2 == 0:raise ValueError("Size must be an odd number.")return v | 2 | 4 | 2 | 26 | 0 | 58 | 79 | 58 | cls,v | [] | int | {"Expr": 1, "If": 1, "Return": 1} | 2 | 22 | 2 | ["ValueError", "field_validator"] | 0 | [] | The function (odd_value) defined within the public class called N2VManipulateModel, that inherit another class.The function start at line 58 and ends at 79. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [58.0] and does not return any value. It declares 2.0 fu... |
CAREamics_careamics | NormalizeModel | public | 0 | 1 | validate_means_stds | def validate_means_stds(self: Self) -> Self:"""Validate that the means and stds have the same length.Returns-------SelfThe instance of the model."""if len(self.image_means) != len(self.image_stds):raise ValueError("The number of image means and stds must be the same.")if (self.target_means is None) != (self.target_stds... | 6 | 13 | 1 | 89 | 0 | 37 | 59 | 37 | self | [] | Self | {"Expr": 1, "If": 4, "Return": 1} | 8 | 23 | 8 | ["len", "len", "ValueError", "ValueError", "len", "len", "ValueError", "model_validator"] | 0 | [] | The function (validate_means_stds) defined within the public class called NormalizeModel, that inherit another class.The function start at line 37 and ends at 59. It contains 13 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 8.... |
CAREamics_careamics | TransformModel | public | 0 | 1 | model_dump | def model_dump(self, **kwargs) -> dict[str, Any]:"""Return the model as a dictionary.Parameters----------**kwargsPydantic BaseMode model_dump method keyword arguments.Returns-------{str: Any}Dictionary representation of the model."""model_dict = super().model_dump(**kwargs)# remove the name fieldmodel_dict.pop("name")r... | 1 | 4 | 2 | 35 | 0 | 26 | 45 | 26 | self,**kwargs | [] | dict[str, Any] | {"Assign": 1, "Expr": 2, "Return": 1} | 3 | 20 | 3 | ["model_dump", "super", "model_dict.pop"] | 26 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70411402_jeertmans_manim_slides.tests.test_wizard_py.test_init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70411402_jeertmans_manim_slides.tests.test_wizard_py.test_init_custom_path", "_.content.gdrive.MyDrive.P... | The function (model_dump) defined within the public class called TransformModel, that inherit another class.The function start at line 26 and ends at 45. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [26.0] and does not return any value. It declares 3.0 funct... |
CAREamics_careamics | public | public | 0 | 0 | model_without_n2v2 | def model_without_n2v2(model: UNetModel) -> UNetModel:"""Validate that the Unet model does not have the n2v2 attribute.Parameters----------model : UNetModelModel to validate.Returns-------UNetModelThe validated model.Raises------ValueErrorIf the model has the `n2v2` attribute set to `True`."""if model.n2v2:raise ValueE... | 2 | 7 | 1 | 23 | 0 | 6 | 30 | 6 | model | [] | UNetModel | {"Expr": 1, "If": 1, "Return": 1} | 1 | 25 | 1 | ["ValueError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.config.validators.test_model_validators_py.test_model_without_n2v2"] | The function (model_without_n2v2) defined within the public class called public.The function start at line 6 and ends at 30. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called i... |
CAREamics_careamics | public | public | 0 | 0 | model_without_final_activation | def model_without_final_activation(model: UNetModel) -> UNetModel:"""Validate that the UNet model does not have the final_activation.Parameters----------model : UNetModelModel to validate.Returns-------UNetModelThe validated model.Raises------ValueErrorIf the model has the final_activation attribute set."""if model.fin... | 2 | 7 | 1 | 25 | 0 | 33 | 57 | 33 | model | [] | UNetModel | {"Expr": 1, "If": 1, "Return": 1} | 1 | 25 | 1 | ["ValueError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.config.validators.test_model_validators_py.test_model_without_final_activation"] | The function (model_without_final_activation) defined within the public class called public.The function start at line 33 and ends at 57. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 func... |
CAREamics_careamics | public | public | 0 | 0 | model_matching_in_out_channels | def model_matching_in_out_channels(model: UNetModel) -> UNetModel:"""Validate that the UNet model has the same number of channel inputs and outputs.Parameters----------model : UNetModelModel to validate.Returns-------UNetModelValidated model.Raises------ValueErrorIf the model has different number of input and output ch... | 2 | 7 | 1 | 27 | 0 | 60 | 84 | 60 | model | [] | UNetModel | {"Expr": 1, "If": 1, "Return": 1} | 1 | 25 | 1 | ["ValueError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.config.validators.test_model_validators_py.test_model_matching_in_out_channels"] | The function (model_matching_in_out_channels) defined within the public class called public.The function start at line 60 and ends at 84. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 func... |
CAREamics_careamics | public | public | 0 | 0 | check_axes_validity | def check_axes_validity(axes: str) -> None:"""Sanity check on axes.The constraints on the axes are the following:- must be a combination of 'STCZYX'- must not contain duplicates- must contain at least 2 contiguous axes: X and Y- must contain at most 4 axes- cannot contain both S and T axesAxes do not need to be in the ... | 9 | 18 | 1 | 102 | 1 | 12 | 53 | 12 | axes | ['_axes'] | None | {"Assign": 1, "Expr": 1, "For": 1, "If": 4} | 10 | 42 | 10 | ["axes.upper", "len", "len", "ValueError", "ValueError", "all", "ValueError", "enumerate", "_axes.rfind", "ValueError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.data.data_model_py.DataConfig.axes_valid", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.data.ng_data_model_py.NGDa... | The function (check_axes_validity) defined within the public class called public.The function start at line 12 and ends at 53. It contains 18 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value. It declares 10.0 functions, It has 10.0 functions ... |
CAREamics_careamics | public | public | 0 | 0 | value_ge_than_8_power_of_2 | def value_ge_than_8_power_of_2(value: int,) -> None:"""Validate that the value is greater or equal than 8 and a power of 2.Parameters----------value : intValue to validate.Raises------ValueErrorIf the value is smaller than 8.ValueErrorIf the value is not a power of 2."""if value < 8:raise ValueError(f"Value must be gre... | 3 | 7 | 1 | 41 | 0 | 56 | 78 | 56 | value | [] | None | {"Expr": 1, "If": 2} | 2 | 23 | 2 | ["ValueError", "ValueError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.validators.validator_utils_py.patch_size_ge_than_8_power_of_2"] | The function (value_ge_than_8_power_of_2) defined within the public class called public.The function start at line 56 and ends at 78. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functi... |
CAREamics_careamics | public | public | 0 | 0 | patch_size_ge_than_8_power_of_2 | def patch_size_ge_than_8_power_of_2(patch_list: Sequence[int] | None,) -> None:"""Validate that each entry is greater or equal than 8 and a power of 2.Parameters----------patch_list : Sequence of int, or NonePatch size.Raises------ValueErrorIf the patch size if smaller than 8.ValueErrorIf the patch size is not a power ... | 3 | 6 | 1 | 31 | 0 | 81 | 101 | 81 | patch_list | [] | None | {"Expr": 2, "For": 1, "If": 1} | 1 | 21 | 1 | ["value_ge_than_8_power_of_2"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.data.data_model_py.DataConfig.all_elements_power_of_2_minimum_8", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.config.dat... | The function (patch_size_ge_than_8_power_of_2) defined within the public class called public.The function start at line 81 and ends at 101. It contains 6 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 fu... |
CAREamics_careamics | InMemoryDataset | public | 0 | 1 | __init__ | def __init__(self,data_config: DataConfig,inputs: Union[np.ndarray, list[Path]],input_target: Union[np.ndarray, list[Path]] | None = None,read_source_func: Callable = read_tiff,**kwargs: Any,) -> None:"""Constructor.Parameters----------data_config : GeneralDataConfigData configuration.inputs : numpy.ndarray or list[pat... | 3 | 51 | 6 | 300 | 0 | 48 | 128 | 48 | self,data_config,inputs,input_target,read_source_func,**kwargs | [] | None | {"Assign": 15, "Expr": 3, "If": 2} | 8 | 81 | 8 | ["self._prepare_patches", "logger.info", "Stats", "Stats", "self.data_config.set_means_and_stds", "Compose", "NormalizeModel", "list"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called InMemoryDataset, that inherit another class.The function start at line 48 and ends at 128. It contains 51 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [48.0] and does not return any value. It declares 8.0 func... |
CAREamics_careamics | InMemoryDataset | public | 0 | 1 | _prepare_patches | def _prepare_patches(self, supervised: bool) -> PatchedOutput:"""Iterate over data source and create an array of patches.Parameters----------supervised : boolWhether the dataset is supervised or not.Returns-------numpy.ndarrayArray of patches."""if supervised:if isinstance(self.inputs, np.ndarray) and isinstance(self.i... | 7 | 39 | 2 | 165 | 0 | 130 | 181 | 130 | self,supervised | [] | PatchedOutput | {"Expr": 1, "If": 4, "Return": 4} | 12 | 52 | 12 | ["isinstance", "isinstance", "prepare_patches_supervised_array", "isinstance", "isinstance", "prepare_patches_supervised", "ValueError", "type", "type", "isinstance", "prepare_patches_unsupervised_array", "prepare_patches_unsupervised"] | 0 | [] | The function (_prepare_patches) defined within the public class called InMemoryDataset, that inherit another class.The function start at line 130 and ends at 181. It contains 39 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [130.0] and does not return any value. It declare... |
CAREamics_careamics | InMemoryDataset | public | 0 | 1 | __len__ | def __len__(self) -> int:"""Return the length of the dataset.Returns-------intLength of the dataset."""return self.data.shape[0] | 1 | 2 | 1 | 17 | 0 | 183 | 192 | 183 | self | [] | int | {"Expr": 1, "Return": 1} | 0 | 10 | 0 | [] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3576232_vmware_liota.packages.examples.kura.kura_integrate_iotcc_py.sub_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3665918_alvinwan_neural_backed_decision_trees.nbdt.data.imagenet_py._TinyImagenet200Va... | The function (__len__) defined within the public class called InMemoryDataset, that inherit another class.The function start at line 183 and ends at 192. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 3.0 functions cal... |
CAREamics_careamics | InMemoryDataset | public | 0 | 1 | __getitem__ | def __getitem__(self, index: int) -> tuple[np.ndarray, ...]:"""Return the patch corresponding to the provided index.Parameters----------index : intIndex of the patch to return.Returns-------tuple of numpy.ndarrayPatch.Raises------ValueErrorIf dataset mean and std are not set."""patch = self.data[index]# if there is a t... | 2 | 6 | 2 | 65 | 0 | 194 | 221 | 194 | self,index | [] | tuple[np.ndarray, ...] | {"Assign": 2, "Expr": 1, "If": 1, "Return": 2} | 2 | 28 | 2 | ["self.patch_transform", "self.patch_transform"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535398_idsia_brainstorm.brainstorm.structure.buffer_views_py.BufferView.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.pypump.models.feed_py.Lists.__getitem__", "_.content.gdriv... | The function (__getitem__) defined within the public class called InMemoryDataset, that inherit another class.The function start at line 194 and ends at 221. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [194.0] and does not return any value. It declares 2.0 ... |
CAREamics_careamics | InMemoryDataset | public | 0 | 1 | get_data_statistics | def get_data_statistics(self) -> tuple[list[float], list[float]]:"""Return training data statistics.This does not return the target data statistics, only those of the input.Returns-------tuple of list of floatsMeans and standard deviations across channels of the training data."""return self.image_stats.get_statistics() | 1 | 2 | 1 | 27 | 0 | 223 | 233 | 223 | self | [] | tuple[list[float], list[float]] | {"Expr": 1, "Return": 1} | 1 | 11 | 1 | ["self.image_stats.get_statistics"] | 0 | [] | The function (get_data_statistics) defined within the public class called InMemoryDataset, that inherit another class.The function start at line 223 and ends at 233. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1... |
CAREamics_careamics | InMemoryDataset | public | 0 | 1 | split_dataset | def split_dataset(self,percentage: float = 0.1,minimum_patches: int = 1,) -> InMemoryDataset:"""Split a new dataset away from the current one.This method is used to extract random validation patches from the dataset.Parameters----------percentage : float, optionalPercentage of patches to extract, by default 0.1.minimum... | 7 | 27 | 3 | 185 | 0 | 235 | 303 | 235 | self,percentage,minimum_patches | [] | InMemoryDataset | {"Assign": 10, "Expr": 1, "If": 4, "Return": 1} | 11 | 69 | 11 | ["ValueError", "len", "ValueError", "len", "len", "max", "round", "np.random.choice", "np.delete", "np.delete", "copy.deepcopy"] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.56769247_dmwm_cmsspark.src.python.CMSSpark.data_collection_py.run_aaa", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.56769247_dmwm_cmsspark.src.python.CMSSpark.data_collection_py.run_cmssw", "_.content.gdrive.MyDri... | The function (split_dataset) defined within the public class called InMemoryDataset, that inherit another class.The function start at line 235 and ends at 303. It contains 27 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [235.0] and does not return any value. It declares 1... |
CAREamics_careamics | InMemoryPredDataset | public | 0 | 1 | __init__ | def __init__(self,prediction_config: InferenceConfig,inputs: NDArray,) -> None:"""Constructor.Parameters----------prediction_config : InferenceConfigPrediction configuration.inputs : NDArrayInput data.Raises------ValueErrorIf data_path is not a directory."""self.pred_config = prediction_configself.input_array = inputss... | 1 | 16 | 3 | 94 | 0 | 26 | 59 | 26 | self,prediction_config,inputs | [] | None | {"Assign": 7, "Expr": 1} | 3 | 34 | 3 | ["reshape_array", "Compose", "NormalizeModel"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called InMemoryPredDataset, that inherit another class.The function start at line 26 and ends at 59. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [26.0] and does not return any value. It declares 3.0 f... |
CAREamics_careamics | InMemoryPredDataset | public | 0 | 1 | __len__ | def __len__(self) -> int:"""Return the length of the dataset.Returns-------intLength of the dataset."""return len(self.data) | 1 | 2 | 1 | 15 | 0 | 61 | 70 | 61 | self | [] | int | {"Expr": 1, "Return": 1} | 1 | 10 | 1 | ["len"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3576232_vmware_liota.packages.examples.kura.kura_integrate_iotcc_py.sub_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3665918_alvinwan_neural_backed_decision_trees.nbdt.data.imagenet_py._TinyImagenet200Va... | The function (__len__) defined within the public class called InMemoryPredDataset, that inherit another class.The function start at line 61 and ends at 70. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 functio... |
CAREamics_careamics | InMemoryPredDataset | public | 0 | 1 | __getitem__ | def __getitem__(self, index: int) -> tuple[NDArray, ...]:"""Return the patch corresponding to the provided index.Parameters----------index : intIndex of the patch to return.Returns-------tuple(numpy.ndarray, ...)Transformed patch."""return self.patch_transform(patch=self.data[index]) | 1 | 2 | 2 | 31 | 0 | 72 | 86 | 72 | self,index | [] | tuple[NDArray, ...] | {"Expr": 1, "Return": 1} | 1 | 15 | 1 | ["self.patch_transform"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535398_idsia_brainstorm.brainstorm.structure.buffer_views_py.BufferView.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.pypump.models.feed_py.Lists.__getitem__", "_.content.gdriv... | The function (__getitem__) defined within the public class called InMemoryPredDataset, that inherit another class.The function start at line 72 and ends at 86. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [72.0] and does not return any value. It declare 1.0 ... |
CAREamics_careamics | InMemoryTiledPredDataset | public | 0 | 1 | __init__ | def __init__(self,prediction_config: InferenceConfig,inputs: NDArray,) -> None:"""Constructor.Parameters----------prediction_config : InferenceConfigPrediction configuration.inputs : NDArrayInput data.Raises------ValueErrorIf data_path is not a directory."""if (prediction_config.tile_size is Noneor prediction_config.ti... | 3 | 26 | 3 | 124 | 0 | 28 | 72 | 28 | self,prediction_config,inputs | [] | None | {"Assign": 9, "Expr": 1, "If": 1} | 4 | 45 | 4 | ["ValueError", "self._prepare_tiles", "Compose", "NormalizeModel"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called InMemoryTiledPredDataset, that inherit another class.The function start at line 28 and ends at 72. It contains 26 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [28.0] and does not return any value. It declares ... |
CAREamics_careamics | InMemoryTiledPredDataset | public | 0 | 1 | _prepare_tiles | def _prepare_tiles(self) -> list[tuple[NDArray, TileInformation]]:"""Iterate over data source and create an array of patches.Returns-------list of tuples of NDArray and TileInformationList of tiles and tile information."""# reshape arrayreshaped_sample = reshape_array(self.input_array, self.axes)# generate patches, whi... | 2 | 11 | 1 | 70 | 0 | 74 | 97 | 74 | self | [] | list[tuple[NDArray, TileInformation]] | {"Assign": 3, "Expr": 1, "If": 1, "Return": 1} | 5 | 24 | 5 | ["reshape_array", "extract_tiles", "list", "len", "ValueError"] | 0 | [] | The function (_prepare_tiles) defined within the public class called InMemoryTiledPredDataset, that inherit another class.The function start at line 74 and ends at 97. It contains 11 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declar... |
CAREamics_careamics | InMemoryTiledPredDataset | public | 0 | 1 | __len__ | def __len__(self) -> int:"""Return the length of the dataset.Returns-------intLength of the dataset."""return len(self.data) | 1 | 2 | 1 | 15 | 0 | 99 | 108 | 99 | self | [] | int | {"Expr": 1, "Return": 1} | 1 | 10 | 1 | ["len"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3576232_vmware_liota.packages.examples.kura.kura_integrate_iotcc_py.sub_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3665918_alvinwan_neural_backed_decision_trees.nbdt.data.imagenet_py._TinyImagenet200Va... | The function (__len__) defined within the public class called InMemoryTiledPredDataset, that inherit another class.The function start at line 99 and ends at 108. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 f... |
CAREamics_careamics | InMemoryTiledPredDataset | public | 0 | 1 | __getitem__ | def __getitem__(self, index: int) -> tuple[tuple[NDArray, ...], TileInformation]:"""Return the patch corresponding to the provided index.Parameters----------index : intIndex of the patch to return.Returns-------tuple of NDArray and TileInformationTransformed patch."""tile_array, tile_info = self.data[index]# Apply tran... | 1 | 4 | 2 | 46 | 0 | 110 | 129 | 110 | self,index | [] | tuple[tuple[NDArray, ...], TileInformation] | {"Assign": 2, "Expr": 1, "Return": 1} | 1 | 20 | 1 | ["self.patch_transform"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535398_idsia_brainstorm.brainstorm.structure.buffer_views_py.BufferView.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.pypump.models.feed_py.Lists.__getitem__", "_.content.gdriv... | The function (__getitem__) defined within the public class called InMemoryTiledPredDataset, that inherit another class.The function start at line 110 and ends at 129. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [110.0] and does not return any value. It decl... |
CAREamics_careamics | PathIterableDataset | public | 0 | 1 | __init__ | def __init__(self,data_config: DataConfig,src_files: list[Path],target_files: list[Path] | None = None,read_source_func: Callable = read_tiff,) -> None:"""Constructors.Parameters----------data_config : GeneralDataConfigData configuration.src_files : list[Path]List of data files.target_files : list[Path] or None, option... | 4 | 47 | 5 | 253 | 0 | 49 | 118 | 49 | self,data_config,src_files,target_files,read_source_func | [] | None | {"Assign": 7, "Expr": 3, "If": 1} | 10 | 70 | 10 | ["self._calculate_mean_and_std", "logger.info", "self.data_config.set_means_and_stds", "list", "list", "Stats", "Stats", "Compose", "NormalizeModel", "list"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called PathIterableDataset, that inherit another class.The function start at line 49 and ends at 118. It contains 47 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [49.0] and does not return any value. It declares 10.0... |
CAREamics_careamics | PathIterableDataset | public | 0 | 1 | _calculate_mean_and_std | def _calculate_mean_and_std(self) -> tuple[Stats, Stats]:"""Calculate mean and std of the dataset.Returns-------tuple of Stats and optional StatsData classes containing the image and target statistics."""num_samples = 0image_stats = WelfordStatistics()if self.target_files is not None:target_stats = WelfordStatistics()f... | 6 | 23 | 1 | 160 | 0 | 120 | 160 | 120 | self | [] | tuple[Stats, Stats] | {"Assign": 5, "AugAssign": 1, "Expr": 3, "For": 1, "If": 4, "Return": 2} | 14 | 41 | 14 | ["WelfordStatistics", "WelfordStatistics", "iterate_over_files", "image_stats.update", "target_stats.update", "ValueError", "image_stats.finalize", "target_stats.finalize", "Stats", "Stats", "np.array", "np.array", "Stats", "Stats"] | 0 | [] | The function (_calculate_mean_and_std) defined within the public class called PathIterableDataset, that inherit another class.The function start at line 120 and ends at 160. It contains 23 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It ... |
CAREamics_careamics | PathIterableDataset | public | 0 | 1 | __iter__ | def __iter__(self,) -> Generator[tuple[np.ndarray, ...], None, None]:"""Iterate over data source and yield single patch.Yields------np.ndarraySingle patch."""assert (self.image_stats.means is not None and self.image_stats.stds is not None), "Mean and std must be provided"# iterate over filesfor sample_input, sample_tar... | 4 | 19 | 1 | 115 | 0 | 162 | 195 | 162 | self | [] | Generator[tuple[np.ndarray, ...], None, None] | {"Assign": 1, "Expr": 2, "For": 2} | 3 | 34 | 3 | ["iterate_over_files", "extract_patches_random", "self.patch_transform"] | 13 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3721936_jaraco_configparser.backports.configparser.__init___py.SectionProxy.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._convert_py.JavaMap.__iter__", "_.content.gdri... | The function (__iter__) defined within the public class called PathIterableDataset, that inherit another class.The function start at line 162 and ends at 195. It contains 19 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 3.0 fu... |
CAREamics_careamics | PathIterableDataset | public | 0 | 1 | get_data_statistics | def get_data_statistics(self) -> tuple[list[float], list[float]]:"""Return training data statistics.Returns-------tuple of list of floatsMeans and standard deviations across channels of the training data."""return self.image_stats.get_statistics() | 1 | 2 | 1 | 27 | 0 | 197 | 205 | 197 | self | [] | tuple[list[float], list[float]] | {"Expr": 1, "Return": 1} | 1 | 9 | 1 | ["self.image_stats.get_statistics"] | 0 | [] | The function (get_data_statistics) defined within the public class called PathIterableDataset, that inherit another class.The function start at line 197 and ends at 205. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It decla... |
CAREamics_careamics | PathIterableDataset | public | 0 | 1 | get_number_of_files | def get_number_of_files(self) -> int:"""Return the number of files in the dataset.Returns-------intNumber of files in the dataset."""return len(self.data_files) | 1 | 2 | 1 | 15 | 0 | 207 | 216 | 207 | self | [] | int | {"Expr": 1, "Return": 1} | 1 | 10 | 1 | ["len"] | 0 | [] | The function (get_number_of_files) defined within the public class called PathIterableDataset, that inherit another class.The function start at line 207 and ends at 216. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It decla... |
CAREamics_careamics | PathIterableDataset | public | 0 | 1 | split_dataset | def split_dataset(self,percentage: float = 0.1,minimum_number: int = 5,) -> PathIterableDataset:"""Split up dataset in two.Splits the datest sing a percentage of the data (files) to extract, or theminimum number of the percentage is less than the minimum number.Parameters----------percentage : float, optionalPercentage... | 13 | 34 | 3 | 227 | 0 | 218 | 294 | 218 | self,percentage,minimum_number | [] | PathIterableDataset | {"Assign": 12, "Expr": 3, "For": 2, "If": 6, "Return": 1} | 13 | 77 | 13 | ["ValueError", "self.get_number_of_files", "ValueError", "self.get_number_of_files", "self.get_number_of_files", "max", "round", "np.random.choice", "enumerate", "data_files.append", "enumerate", "data_target_files.append", "copy.deepcopy"] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.56769247_dmwm_cmsspark.src.python.CMSSpark.data_collection_py.run_aaa", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.56769247_dmwm_cmsspark.src.python.CMSSpark.data_collection_py.run_cmssw", "_.content.gdrive.MyDri... | The function (split_dataset) defined within the public class called PathIterableDataset, that inherit another class.The function start at line 218 and ends at 294. It contains 34 lines of code and it has a cyclomatic complexity of 13. It takes 3 parameters, represented as [218.0] and does not return any value. It decla... |
CAREamics_careamics | IterablePredDataset | public | 0 | 1 | __init__ | def __init__(self,prediction_config: InferenceConfig,src_files: list[Path],read_source_func: Callable = read_tiff,**kwargs: Any,) -> None:"""Constructor.Parameters----------prediction_config : InferenceConfigInference configuration.src_files : list of pathlib.PathList of data files.read_source_func : Callable, optional... | 3 | 27 | 5 | 124 | 0 | 48 | 96 | 48 | self,prediction_config,src_files,read_source_func,**kwargs | [] | None | {"Assign": 7, "Expr": 1, "If": 1} | 3 | 49 | 3 | ["ValueError", "Compose", "NormalizeModel"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called IterablePredDataset, that inherit another class.The function start at line 48 and ends at 96. It contains 27 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [48.0] and does not return any value. It declares 3.0 f... |
CAREamics_careamics | IterablePredDataset | public | 0 | 1 | __iter__ | def __iter__(self,) -> Generator[tuple[NDArray, ...], None, None]:"""Iterate over data source and yield single patch.Yields------(numpy.ndarray, numpy.ndarray or None)Single patch."""assert (self.image_means is not None and self.image_stds is not None), "Mean and std must be provided"for sample, _ in iterate_over_files... | 4 | 13 | 1 | 87 | 0 | 98 | 121 | 98 | self | [] | Generator[tuple[NDArray, ...], None, None] | {"Expr": 2, "For": 2} | 3 | 24 | 3 | ["iterate_over_files", "range", "self.patch_transform"] | 13 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3721936_jaraco_configparser.backports.configparser.__init___py.SectionProxy.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._convert_py.JavaMap.__iter__", "_.content.gdri... | The function (__iter__) defined within the public class called IterablePredDataset, that inherit another class.The function start at line 98 and ends at 121. It contains 13 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 3.0 fun... |
CAREamics_careamics | IterableTiledPredDataset | public | 0 | 1 | __init__ | def __init__(self,prediction_config: InferenceConfig,src_files: list[Path],read_source_func: Callable = read_tiff,**kwargs: Any,) -> None:"""Constructor.Parameters----------prediction_config : InferenceConfigInference configuration.src_files : List[Path]List of data files.read_source_func : Callable, optionalRead sourc... | 5 | 36 | 5 | 158 | 0 | 50 | 108 | 50 | self,prediction_config,src_files,read_source_func,**kwargs | [] | None | {"Assign": 9, "Expr": 1, "If": 2} | 4 | 59 | 4 | ["ValueError", "ValueError", "Compose", "NormalizeModel"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called IterableTiledPredDataset, that inherit another class.The function start at line 50 and ends at 108. It contains 36 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [50.0] and does not return any value. It declares... |
CAREamics_careamics | IterableTiledPredDataset | public | 0 | 1 | __iter__ | def __iter__(self,) -> Generator[tuple[tuple[NDArray, ...], TileInformation], None, None]:"""Iterate over data source and yield single patch.Yields------Generator of (np.ndarray, np.ndarray or None) and TileInformation tupleGenerator of single tiles."""assert (self.image_means is not None and self.image_stds is not Non... | 4 | 19 | 1 | 109 | 0 | 110 | 141 | 110 | self | [] | Generator[tuple[tuple[NDArray, ...], TileInformation], None, None] | {"Assign": 2, "Expr": 2, "For": 2} | 3 | 32 | 3 | ["iterate_over_files", "extract_tiles", "self.patch_transform"] | 13 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3721936_jaraco_configparser.backports.configparser.__init___py.SectionProxy.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._convert_py.JavaMap.__iter__", "_.content.gdri... | The function (__iter__) defined within the public class called IterableTiledPredDataset, that inherit another class.The function start at line 110 and ends at 141. It contains 19 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 3... |
CAREamics_careamics | public | public | 0 | 0 | _get_shape_order | def _get_shape_order(shape_in: tuple[int, ...], axes_in: str, ref_axes: str = "STCZYX") -> tuple[tuple[int, ...], str, list[int]]:"""Compute a new shape for the array based on the reference axes.Parameters----------shape_in : tuple[int, ...]Input shape.axes_in : strInput axes.ref_axes : strReference axes.Returns-------... | 4 | 8 | 3 | 109 | 4 | 10 | 39 | 10 | shape_in,axes_in,ref_axes | ['new_indices', 'new_axes', 'new_shape', 'indices'] | tuple[tuple[int, ...], str, list[int]] | {"Assign": 4, "Expr": 1, "Return": 1} | 5 | 30 | 5 | ["axes_in.find", "list", "filter", "tuple", "join"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.dataset_utils.dataset_utils_py.reshape_array"] | The function (_get_shape_order) defined within the public class called public.The function start at line 10 and ends at 39. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [10.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions cal... |
CAREamics_careamics | public | public | 0 | 0 | reshape_array | def reshape_array(x: np.ndarray, axes: str) -> np.ndarray:"""Reshape the data to (S, C, (Z), Y, X) by moving axes.If the data has both S and T axes, the two axes will be merged. A singletondimension is added if there are no C axis.Parameters----------x : np.ndarrayInput array.axes : strDescription of axes in format `ST... | 6 | 23 | 2 | 188 | 6 | 42 | 99 | 42 | x,axes | ['_axes', 'destination', 'indices', '_x', 'new_axes', 'new_x_shape'] | np.ndarray | {"Assign": 13, "Expr": 1, "If": 4, "Return": 1} | 12 | 58 | 12 | ["len", "len", "ValueError", "_get_shape_order", "list", "range", "len", "np.moveaxis", "new_axes.replace", "_x.reshape", "np.expand_dims", "new_axes.index"] | 19 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.careamist_py.CAREamist.export_to_bmz", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.dataset_utils.iterate_over_files_py.... | The function (reshape_array) defined within the public class called public.The function start at line 42 and ends at 99. It contains 23 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [42.0] and does not return any value. It declares 12.0 functions, It has 12.0 functions cal... |
CAREamics_careamics | public | public | 0 | 0 | get_files_size | def get_files_size(files: list[Path]) -> float:"""Get files size in MB.Parameters----------files : list of pathlib.PathList of files.Returns-------floatTotal size of the files in MB."""return np.sum([f.stat().st_size / 1024**2 for f in files]) | 2 | 2 | 1 | 36 | 0 | 15 | 28 | 15 | files | [] | float | {"Expr": 1, "Return": 1} | 2 | 14 | 2 | ["np.sum", "f.stat"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.lightning.train_data_module_py.TrainDataModule.prepare_data", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.dataset_utils.test_li... | The function (get_files_size) defined within the public class called public.The function start at line 15 and ends at 28. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called i... |
CAREamics_careamics | public | public | 0 | 0 | list_files | def list_files(data_path: Union[str, Path],data_type: Union[str, SupportedData],extension_filter: str = "",) -> list[Path]:"""List recursively files in `data_path` and return a sorted list.If `data_path` is a file, its name is validated against the `data_type` using`fnmatch`, and the method returns `data_path` itself.B... | 7 | 26 | 3 | 143 | 3 | 31 | 105 | 31 | data_path,data_type,extension_filter | ['files', 'data_path', 'extension'] | list[Path] | {"Assign": 5, "Expr": 1, "If": 5, "Return": 1} | 13 | 75 | 13 | ["Path", "data_path.exists", "FileNotFoundError", "SupportedData.get_extension_pattern", "data_path.is_dir", "sorted", "data_path.rglob", "fnmatch", "str", "data_path.absolute", "ValueError", "len", "ValueError"] | 13 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689214_zowe_zowe_client_python_sdk.tests.unit.files.uss.test_uss_py.TestFilesClass.test_list_uss", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.careamist_py.CAREamist.pre... | The function (list_files) defined within the public class called public.The function start at line 31 and ends at 105. It contains 26 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [31.0] and does not return any value. It declares 13.0 functions, It has 13.0 functions calle... |
CAREamics_careamics | public | public | 0 | 0 | validate_source_target_files | def validate_source_target_files(src_files: list[Path], tar_files: list[Path]) -> None:"""Validate source and target path lists.The two lists should have the same number of files, and the filenames should match.Parameters----------src_files : list of pathlib.PathList of source files.tar_files : list of pathlib.PathList... | 5 | 11 | 2 | 83 | 3 | 108 | 141 | 108 | src_files,tar_files | ['difference', 'tar_names', 'src_names'] | None | {"Assign": 3, "Expr": 1, "If": 2} | 8 | 34 | 8 | ["len", "len", "ValueError", "len", "len", "src_names.symmetric_difference", "len", "ValueError"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.lightning.dataset_ng.data_module_py.CareamicsDataModule._convert_paths_to_pathlib", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics... | The function (validate_source_target_files) defined within the public class called public.The function start at line 108 and ends at 141. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [108.0] and does not return any value. It declares 8.0 functions, It has 8... |
CAREamics_careamics | public | public | 0 | 0 | iterate_over_files | def iterate_over_files(data_config: Union[DataConfig, InferenceConfig],data_files: list[Path],target_files: list[Path] | None = None,read_source_func: Callable = read_tiff,) -> Generator[tuple[NDArray, NDArray | None], None, None]:"""Iterate over data source and yield whole reshaped images.Parameters----------data_conf... | 8 | 28 | 4 | 195 | 7 | 21 | 84 | 21 | data_config,data_files,target_files,read_source_func | ['target', 'num_workers', 'worker_id', 'reshaped_sample', 'reshaped_target', 'sample', 'worker_info'] | Generator[tuple[NDArray, NDArray | None], None, None] | {"Assign": 7, "Expr": 4, "For": 1, "If": 3, "Try": 1} | 8 | 64 | 8 | ["get_worker_info", "enumerate", "read_source_func", "reshape_array", "ValueError", "read_source_func", "reshape_array", "logger.error"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.iterable_dataset_py.PathIterableDataset.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.iterable_dataset... | The function (iterate_over_files) defined within the public class called public.The function start at line 21 and ends at 84. It contains 28 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [21.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions ... |
CAREamics_careamics | public | public | 0 | 0 | compute_normalization_stats | def compute_normalization_stats(image: NDArray) -> tuple[NDArray, NDArray]:"""Compute mean and standard deviation of an array.Expected input shape is (S, C, (Z), Y, X). The mean and standard deviation arecomputed per channel.Parameters----------image : NDArrayInput array.Returns-------tuple of (list of floats, list of ... | 2 | 6 | 1 | 85 | 0 | 7 | 30 | 7 | image | [] | tuple[NDArray, NDArray] | {"Assign": 1, "Expr": 3, "For": 1, "Return": 1} | 7 | 24 | 7 | ["range", "means.append", "mean", "stds.append", "std", "np.stack", "np.stack"] | 8 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.dataset_utils.running_stats_py.WelfordStatistics.update", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.patching.... | The function (compute_normalization_stats) defined within the public class called public.The function start at line 7 and ends at 30. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 7.0 functions, It has 7.0 functi... |
CAREamics_careamics | public | public | 0 | 0 | update_iterative_stats | def update_iterative_stats(count: NDArray, mean: NDArray, m2: NDArray, new_values: NDArray) -> tuple[NDArray, NDArray, NDArray]:"""Update the mean and variance of an array iteratively.Parameters----------count : NDArrayNumber of elements in the array. Shape: (C,).mean : NDArrayMean of the array. Shape: (C,).m2 : NDArra... | 1 | 10 | 4 | 137 | 3 | 33 | 69 | 33 | count,mean,m2,new_values | ['num_channels', 'delta2', 'delta'] | tuple[NDArray, NDArray, NDArray] | {"Assign": 3, "AugAssign": 3, "Expr": 1, "Return": 1} | 10 | 37 | 10 | ["len", "np.ones_like", "np.prod", "new_values.reshape", "mean.reshape", "np.sum", "count.reshape", "new_values.reshape", "mean.reshape", "np.sum"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.dataset_utils.running_stats_py.WelfordStatistics.update"] | The function (update_iterative_stats) defined within the public class called public.The function start at line 33 and ends at 69. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [33.0] and does not return any value. It declares 10.0 functions, It has 10.0 func... |
CAREamics_careamics | public | public | 0 | 0 | finalize_iterative_stats | def finalize_iterative_stats(count: NDArray, mean: NDArray, m2: NDArray) -> tuple[NDArray, NDArray]:"""Finalize the mean and variance computation.Parameters----------count : NDArrayNumber of elements in the array. Shape: (C,).mean : NDArrayMean of the array. Shape: (C,).m2 : NDArrayVariance of the array. Shape: (C,).Re... | 3 | 8 | 3 | 77 | 1 | 72 | 95 | 72 | count,mean,m2 | ['std'] | tuple[NDArray, NDArray] | {"Assign": 1, "Expr": 1, "If": 1, "Return": 2} | 4 | 24 | 4 | ["np.sqrt", "any", "np.full", "np.full"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.dataset_utils.running_stats_py.WelfordStatistics.finalize"] | The function (finalize_iterative_stats) defined within the public class called public.The function start at line 72 and ends at 95. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [72.0] and does not return any value. It declares 4.0 functions, It has 4.0 funct... |
CAREamics_careamics | WelfordStatistics | public | 0 | 0 | update | def update(self, array: NDArray, sample_idx: int) -> None:"""Update the Welford statistics.Parameters----------array : NDArrayInput array.sample_idx : intCurrent sample number."""self.sample_idx = sample_idxsample_channels = np.array(np.split(array, array.shape[1], axis=1))# Initialize the statisticsif self.sample_idx ... | 2 | 16 | 3 | 158 | 0 | 106 | 136 | 106 | self,array,sample_idx | [] | None | {"Assign": 5, "AugAssign": 1, "Expr": 1, "If": 1} | 7 | 31 | 7 | ["np.array", "np.split", "compute_normalization_stats", "update_iterative_stats", "np.zeros", "np.zeros", "update_iterative_stats"] | 409 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3468756_plone_plone_app_cmsui.src.plone.app.cmsui.addmenu_py.AddNewContentForm.update", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.backends.memory.__init___py.MemoryBackend.pu... | The function (update) defined within the public class called WelfordStatistics.The function start at line 106 and ends at 136. It contains 16 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [106.0] and does not return any value. It declares 7.0 functions, It has 7.0 function... |
CAREamics_careamics | WelfordStatistics | public | 0 | 0 | finalize | def finalize(self) -> tuple[NDArray, NDArray]:"""Finalize the Welford statistics.Returns-------tuple or numpy arraysFinal mean and standard deviation."""return finalize_iterative_stats(self.count, self.mean, self.m2) | 1 | 2 | 1 | 28 | 0 | 138 | 146 | 138 | self | [] | tuple[NDArray, NDArray] | {"Expr": 1, "Return": 1} | 1 | 9 | 1 | ["finalize_iterative_stats"] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707933_aiortc_aioquic.src.aioquic.tls_py.KeySchedule.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707933_aiortc_aioquic.src.aioquic.tls_py.KeySchedule.certificate_verify_data", "_.content.gdrive.MyDriv... | The function (finalize) defined within the public class called WelfordStatistics.The function start at line 138 and ends at 146. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function call... |
CAREamics_careamics | Stats | public | 0 | 0 | get_statistics | def get_statistics(self) -> tuple[list[float], list[float]]:"""Return the means and standard deviations.Returns-------tuple of two lists of floatsMeans and standard deviations."""if self.means is None or self.stds is None:return [], []return list(self.means), list(self.stds) | 3 | 4 | 1 | 52 | 0 | 29 | 40 | 29 | self | [] | tuple[list[float], list[float]] | {"Expr": 1, "If": 1, "Return": 2} | 2 | 12 | 2 | ["list", "list"] | 0 | [] | The function (get_statistics) defined within the public class called Stats.The function start at line 29 and ends at 40. It contains 4 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions call... |
CAREamics_careamics | public | public | 0 | 0 | prepare_patches_supervised | def prepare_patches_supervised(train_files: list[Path],target_files: list[Path],axes: str,patch_size: Union[list[int], tuple[int, ...]],read_source_func: Callable,) -> PatchedOutput:"""Iterate over data source and create an array of patches and corresponding targets.The lists of Paths should be pre-sorted.Parameters---... | 6 | 44 | 5 | 302 | 2 | 61 | 142 | 61 | train_files,target_files,axes,patch_size,read_source_func | ['sample', 'target'] | PatchedOutput | {"AnnAssign": 4, "Assign": 7, "AugAssign": 3, "Expr": 5, "For": 1, "If": 2, "Return": 1, "Try": 1} | 24 | 82 | 24 | ["zip", "read_source_func", "read_source_func", "sample.mean", "sample.std", "reshape_array", "reshape_array", "extract_patches_sequential", "all_patches.append", "all_targets.append", "ValueError", "logger.error", "len", "ValueError", "compute_normalization_stats", "np.concatenate", "compute_normalization_stats", "np.... | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.in_memory_dataset_py.InMemoryDataset._prepare_patches"] | The function (prepare_patches_supervised) defined within the public class called public.The function start at line 61 and ends at 142. It contains 44 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [61.0] and does not return any value. It declares 24.0 functions, It has 24.0... |
CAREamics_careamics | public | public | 0 | 0 | prepare_patches_unsupervised | def prepare_patches_unsupervised(train_files: list[Path],axes: str,patch_size: Union[list[int], tuple[int]],read_source_func: Callable,) -> PatchedOutput:"""Iterate over data source and create an array of patches.This method returns the mean and standard deviation of the image.Parameters----------train_files : list of ... | 4 | 27 | 4 | 192 | 2 | 146 | 204 | 146 | train_files,axes,patch_size,read_source_func | ['sample', 'all_patches'] | PatchedOutput | {"AnnAssign": 2, "Assign": 5, "AugAssign": 3, "Expr": 4, "For": 1, "If": 1, "Return": 1, "Try": 1} | 15 | 59 | 15 | ["read_source_func", "sample.mean", "sample.std", "reshape_array", "extract_patches_sequential", "all_patches.append", "logger.error", "ValueError", "compute_normalization_stats", "np.concatenate", "np.concatenate", "logger.info", "PatchedOutput", "Stats", "Stats"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.in_memory_dataset_py.InMemoryDataset._prepare_patches"] | The function (prepare_patches_unsupervised) defined within the public class called public.The function start at line 146 and ends at 204. It contains 27 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [146.0] and does not return any value. It declares 15.0 functions, It has ... |
CAREamics_careamics | public | public | 0 | 0 | prepare_patches_supervised_array | def prepare_patches_supervised_array(data: NDArray,axes: str,data_target: NDArray,patch_size: Union[list[int], tuple[int]],) -> PatchedOutput:"""Iterate over data source and create an array of patches.This method expects an array of shape SC(Z)YX, where S and C can be singletondimensions.Patches returned are of shape S... | 2 | 22 | 4 | 121 | 2 | 208 | 260 | 208 | data,axes,data_target,patch_size | ['reshaped_sample', 'reshaped_target'] | PatchedOutput | {"Assign": 5, "Expr": 2, "If": 1, "Return": 1} | 10 | 53 | 10 | ["reshape_array", "reshape_array", "compute_normalization_stats", "compute_normalization_stats", "extract_patches_sequential", "ValueError", "logger.info", "PatchedOutput", "Stats", "Stats"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.in_memory_dataset_py.InMemoryDataset._prepare_patches"] | The function (prepare_patches_supervised_array) defined within the public class called public.The function start at line 208 and ends at 260. It contains 22 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [208.0] and does not return any value. It declares 10.0 functions, It ... |
CAREamics_careamics | public | public | 0 | 0 | prepare_patches_unsupervised_array | def prepare_patches_unsupervised_array(data: NDArray,axes: str,patch_size: Union[list[int], tuple[int]],) -> PatchedOutput:"""Iterate over data source and create an array of patches.This method expects an array of shape SC(Z)YX, where S and C can be singletondimensions.Patches returned are of shape SC(Z)YX, where S is ... | 1 | 9 | 3 | 81 | 1 | 264 | 300 | 264 | data,axes,patch_size | ['reshaped_sample'] | PatchedOutput | {"Assign": 3, "Expr": 1, "Return": 1} | 6 | 37 | 6 | ["reshape_array", "compute_normalization_stats", "extract_patches_sequential", "PatchedOutput", "Stats", "Stats"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.in_memory_dataset_py.InMemoryDataset._prepare_patches"] | The function (prepare_patches_unsupervised_array) defined within the public class called public.The function start at line 264 and ends at 300. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [264.0] and does not return any value. It declares 6.0 functions, It ... |
CAREamics_careamics | public | public | 0 | 0 | extract_patches_random | def extract_patches_random(arr: np.ndarray,patch_size: Union[list[int], tuple[int, ...]],target: np.ndarray | None = None,seed: int | None = None,) -> Generator[tuple[np.ndarray, np.ndarray | None], None, None]:"""Generate patches from an array in a random manner.The method calculates how many patches the image can be ... | 8 | 50 | 4 | 347 | 7 | 13 | 111 | 13 | arr,patch_size,target,seed | ['is_3d_patch', 'patch', 'n_patches', 'crop_coords', 'rng', 'patch_size', 'target_patch'] | Generator[tuple[np.ndarray, np.ndarray | None], None, None] | {"AnnAssign": 2, "Assign": 7, "Expr": 4, "For": 2, "If": 2} | 20 | 99 | 20 | ["np.random.default_rng", "len", "validate_patch_dimensions", "range", "astype", "np.ceil", "np.prod", "np.prod", "range", "rng.integers", "range", "len", "astype", "copy", "slice", "enumerate", "astype", "copy", "slice", "enumerate"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.iterable_dataset_py.PathIterableDataset.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.patching.test_random_pat... | The function (extract_patches_random) defined within the public class called public.The function start at line 13 and ends at 111. It contains 50 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [13.0] and does not return any value. It declares 20.0 functions, It has 20.0 fun... |
CAREamics_careamics | public | public | 0 | 0 | extract_patches_random_from_chunks | def extract_patches_random_from_chunks(arr: zarr.Array,patch_size: Union[list[int], tuple[int, ...]],chunk_size: Union[list[int], tuple[int, ...]],chunk_limit: int | None = None,seed: int | None = None,) -> Generator[np.ndarray, None, None]:"""Generate patches from an array in a random manner.The method calculates how ... | 10 | 53 | 5 | 377 | 9 | 114 | 202 | 114 | arr,patch_size,chunk_size,chunk_limit,seed | ['chunk', 'is_3d_patch', 'chunk_crop_coords', 'patch_crop_coords', 'patch', 'spatial_chunk', 'rng', 'n_patches', 'num_chunks'] | Generator[np.ndarray, None, None] | {"Assign": 10, "Expr": 3, "For": 3, "If": 1} | 30 | 89 | 30 | ["len", "validate_patch_dimensions", "np.random.default_rng", "np.prod", "range", "rng.integers", "max", "range", "len", "squeeze", "slice", "enumerate", "len", "len", "np.expand_dims", "range", "len", "len", "astype", "np.ceil", "np.prod", "np.prod", "range", "rng.integers", "range", "len", "astype", "copy", "slice", ... | 0 | [] | The function (extract_patches_random_from_chunks) defined within the public class called public.The function start at line 114 and ends at 202. It contains 53 lines of code and it has a cyclomatic complexity of 10. It takes 5 parameters, represented as [114.0] and does not return any value. It declares 30.0 functions, ... |
CAREamics_careamics | public | public | 0 | 0 | _compute_number_of_patches | def _compute_number_of_patches(arr_shape: tuple[int, ...], patch_sizes: Union[list[int], tuple[int, ...]]) -> tuple[int, ...]:"""Compute the number of patches that fit in each dimension.Parameters----------arr_shape : tuple[int, ...]Shape of the input array.patch_sizes : Union[list[int], tuple[int, ...]Shape of the pat... | 4 | 19 | 2 | 111 | 1 | 11 | 46 | 11 | arr_shape,patch_sizes | ['n_patches'] | tuple[int, ...] | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1, "Try": 1} | 9 | 36 | 9 | ["len", "len", "ValueError", "astype", "np.ceil", "range", "len", "ValueError", "tuple"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.patching.sequential_patching_py._compute_overlap", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.patching.test_sequential... | The function (_compute_number_of_patches) defined within the public class called public.The function start at line 11 and ends at 46. It contains 19 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [11.0] and does not return any value. It declares 9.0 functions, It has 9.0 fu... |
CAREamics_careamics | public | public | 0 | 0 | _compute_overlap | def _compute_overlap(arr_shape: tuple[int, ...], patch_sizes: Union[list[int], tuple[int, ...]]) -> tuple[int, ...]:"""Compute the overlap between patches in each dimension.If the array dimensions are divisible by the patch sizes, then the overlap is0. Otherwise, it is the result of the division rounded to the upper va... | 2 | 12 | 2 | 111 | 2 | 49 | 79 | 49 | arr_shape,patch_sizes | ['overlap', 'n_patches'] | tuple[int, ...] | {"Assign": 2, "Expr": 1, "Return": 1} | 8 | 31 | 8 | ["_compute_number_of_patches", "astype", "np.ceil", "np.clip", "max", "range", "len", "tuple"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.patching.sequential_patching_py.extract_patches_sequential", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.patching.test_... | The function (_compute_overlap) defined within the public class called public.The function start at line 49 and ends at 79. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [49.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions ca... |
CAREamics_careamics | public | public | 0 | 0 | _compute_patch_steps | def _compute_patch_steps(patch_sizes: Union[list[int], tuple[int, ...]], overlaps: tuple[int, ...]) -> tuple[int, ...]:"""Compute steps between patches.Parameters----------patch_sizes : tuple[int]Size of the patches.overlaps : tuple[int]Overlap between patches.Returns-------tuple[int]Steps between patches."""steps = [m... | 2 | 8 | 2 | 73 | 1 | 82 | 104 | 82 | patch_sizes,overlaps | ['steps'] | tuple[int, ...] | {"Assign": 1, "Expr": 1, "Return": 1} | 4 | 23 | 4 | ["min", "range", "len", "tuple"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.patching.sequential_patching_py.extract_patches_sequential", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.patching.test_... | The function (_compute_patch_steps) defined within the public class called public.The function start at line 82 and ends at 104. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [82.0] and does not return any value. It declares 4.0 functions, It has 4.0 function... |
CAREamics_careamics | public | public | 0 | 0 | _compute_patch_views | def _compute_patch_views(arr: np.ndarray,window_shape: list[int],step: tuple[int, ...],output_shape: list[int],target: np.ndarray | None = None,) -> np.ndarray:"""Compute views of an array corresponding to patches.Parameters----------arr : np.ndarrayArray from which the views are extracted.window_shape : tuple[int]Shap... | 2 | 18 | 5 | 164 | 6 | 108 | 148 | 108 | arr,window_shape,step,output_shape,target | ['patches', 'arr', 'step', 'output_shape', 'rng', 'window_shape'] | np.ndarray | {"Assign": 6, "Expr": 2, "If": 1, "Return": 1} | 5 | 41 | 5 | ["np.random.default_rng", "np.stack", "reshape", "view_as_windows", "rng.shuffle"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.patching.sequential_patching_py.extract_patches_sequential", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.patching.test_... | The function (_compute_patch_views) defined within the public class called public.The function start at line 108 and ends at 148. It contains 18 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [108.0] and does not return any value. It declares 5.0 functions, It has 5.0 funct... |
CAREamics_careamics | public | public | 0 | 0 | extract_patches_sequential | def extract_patches_sequential(arr: np.ndarray,patch_size: Union[list[int], tuple[int, ...]],target: np.ndarray | None = None,) -> tuple[np.ndarray, np.ndarray | None]:"""Generate patches from an array in a sequential manner.Array dimensions should be SC(Z)YX, where S and C can be singleton dimensions. Thepatches are g... | 2 | 27 | 3 | 177 | 6 | 151 | 212 | 151 | arr,patch_size,target | ['is_3d_patch', 'patches', 'window_steps', 'overlaps', 'output_shape', 'patch_size'] | tuple[np.ndarray, np.ndarray | None] | {"Assign": 6, "Expr": 2, "If": 1, "Return": 2} | 5 | 62 | 5 | ["len", "validate_patch_dimensions", "_compute_overlap", "_compute_patch_steps", "_compute_patch_views"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.patching.patching_py.prepare_patches_supervised", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.patching.patching... | The function (extract_patches_sequential) defined within the public class called public.The function start at line 151 and ends at 212. It contains 27 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [151.0] and does not return any value. It declares 5.0 functions, It has 5.0... |
CAREamics_careamics | public | public | 0 | 0 | validate_patch_dimensions | def validate_patch_dimensions(arr: np.ndarray,patch_size: Union[list[int], tuple[int, ...]],is_3d_patch: bool,) -> None:"""Check patch size and array compatibility.This method validates the patch sizes with respect to the array dimensions:- Patch must have two dimensions fewer than the array (S and C).- Patch sizes are... | 6 | 22 | 3 | 124 | 0 | 8 | 64 | 8 | arr,patch_size,is_3d_patch | [] | None | {"Expr": 1, "If": 3} | 5 | 57 | 5 | ["len", "len", "ValueError", "ValueError", "ValueError"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.patching.random_patching_py.extract_patches_random", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.patching.rando... | The function (validate_patch_dimensions) defined within the public class called public.The function start at line 8 and ends at 64. It contains 22 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [8.0] and does not return any value. It declares 5.0 functions, It has 5.0 funct... |
CAREamics_careamics | public | public | 0 | 0 | collate_tiles | def collate_tiles(batch: list[tuple[np.ndarray, TileInformation]]) -> Any:"""Collate tiles received from CAREamics prediction dataloader.CAREamics prediction dataloader returns tuples of arrays and TileInformation. Incase of non-tiled data, this function will return the arrays. In case of tiled data,it will return the ... | 3 | 4 | 1 | 49 | 2 | 11 | 33 | 11 | batch | ['tiles_batch', 'new_batch'] | Any | {"Assign": 2, "Expr": 1, "Return": 1} | 1 | 23 | 1 | ["default_collate"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.tiling.test_collate_tiles_py.test_collate_tiles_2d", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.tiling.test_collate_tiles_py.t... | The function (collate_tiles) defined within the public class called public.The function start at line 11 and ends at 33. It contains 4 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called insid... |
CAREamics_careamics | public | public | 0 | 0 | extract_tiles | def extract_tiles(arr: NDArray,tile_size: NDArray[np.int_],overlaps: NDArray[np.int_],padding_kwargs: dict[str, Any] | None = None,) -> Generator[tuple[NDArray, TileInformation], None, None]:"""Generate tiles from the input array with specified overlap.The tiles cover the whole array; which will be additionally padded,... | 6 | 38 | 4 | 269 | 10 | 15 | 99 | 15 | arr,tile_size,overlaps,padding_kwargs | ['spatial_padding', 'crop_coords_start', 'padding', 'sample', 'tile', 'tile_grid_shape', 'data_shape', 'stitch_size', 'padding_kwargs', 'tile_info'] | Generator[tuple[NDArray, TileInformation], None, None] | {"AnnAssign": 1, "Assign": 11, "Expr": 2, "For": 2, "If": 1} | 15 | 85 | 15 | ["range", "np.array", "compute_padding", "np.pad", "compute_tile_grid_shape", "itertools.product", "range", "np.array", "slice", "zip", "compute_tile_info", "np.array", "np.array", "np.array", "np.array"] | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.in_memory_tiled_pred_dataset_py.InMemoryTiledPredDataset._prepare_tiles", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.d... | The function (extract_tiles) defined within the public class called public.The function start at line 15 and ends at 99. It contains 38 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [15.0] and does not return any value. It declares 15.0 functions, It has 15.0 functions cal... |
CAREamics_careamics | public | public | 0 | 0 | compute_tile_info_legacy | def compute_tile_info_legacy(grid_index_manager: GridIndexManager, index: int) -> TileInformation:"""Compute the tile information for a tile at a given dataset index.Parameters----------grid_index_manager : GridIndexManagerThe grid index manager that keeps track of tile locations.index : intThe dataset index.Returns---... | 5 | 42 | 2 | 228 | 13 | 102 | 181 | 102 | grid_index_manager,index | ['out_of_lower_bound', 'overlap_crop_coords', 'n_spatial_dims', 'stitch_coords_start', 'stitch_coords', 'tile_coords_start', 'out_of_upper_bound', 'overlap_crop_coords_start', 'last_tile', 'data_shape', 'overlap_crop_coords_end', 'stitch_coords_end', 'tile_info'] | TileInformation | {"Assign": 16, "Expr": 1, "If": 2, "Return": 1} | 14 | 80 | 14 | ["np.array", "len", "len", "ValueError", "np.array", "grid_index_manager.get_location_from_dataset_idx", "np.array", "grid_index_manager.patch_offset", "grid_index_manager.total_grid_count", "tuple", "zip", "tuple", "zip", "TileInformation"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.tiling.test_lvae_tiled_patching_py.test_compute_tile_info_legacy"] | The function (compute_tile_info_legacy) defined within the public class called public.The function start at line 102 and ends at 181. It contains 42 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [102.0] and does not return any value. It declares 14.0 functions, It has 14.0... |
CAREamics_careamics | public | public | 0 | 0 | compute_tile_info | def compute_tile_info(tile_grid_indices: NDArray[np.int_],data_shape: NDArray[np.int_],tile_size: NDArray[np.int_],overlaps: NDArray[np.int_],sample_id: int = 0,) -> TileInformation:"""Compute the tile information for a tile with the coordinates `tile_grid_indices`.Parameters----------tile_grid_indices : 1D np.array of... | 3 | 40 | 5 | 227 | 14 | 184 | 258 | 184 | tile_grid_indices,data_shape,tile_size,overlaps,sample_id | ['out_of_lower_bound', 'overlap_crop_coords', 'stitch_coords_start', 'overlap_crop_coords_end', 'stitch_coords', 'tile_coords_start', 'out_of_upper_bound', 'overlap_crop_coords_start', 'tile_grid_shape', 'last_tile', 'stitch_size', 'spatial_dims_shape', 'stitch_coords_end', 'tile_info'] | TileInformation | {"Assign": 16, "Expr": 1, "Return": 1} | 9 | 75 | 9 | ["len", "tuple", "zip", "tuple", "zip", "np.array", "compute_tile_grid_shape", "all", "TileInformation"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.tiling.lvae_tiled_patching_py.extract_tiles", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.tiling.test_lvae_tiled_patchi... | The function (compute_tile_info) defined within the public class called public.The function start at line 184 and ends at 258. It contains 40 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [184.0] and does not return any value. It declares 9.0 functions, It has 9.0 function... |
CAREamics_careamics | public | public | 0 | 0 | compute_padding | def compute_padding(data_shape: NDArray[np.int_],tile_size: NDArray[np.int_],overlaps: NDArray[np.int_],) -> tuple[tuple[int, int], ...]:"""Calculate padding to ensure stitched data comes from the center of a tile.Padding is added to an array with shape `data_shape` so that when tiles arestitched together, the data use... | 2 | 12 | 3 | 113 | 4 | 261 | 297 | 261 | data_shape,tile_size,overlaps | ['pad_before', 'pad_after', 'tile_grid_shape', 'covered_shape'] | tuple[tuple[int, int], ...] | {"Assign": 4, "Expr": 1, "Return": 1} | 5 | 37 | 5 | ["np.array", "compute_tile_grid_shape", "len", "tuple", "zip"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.tiling.lvae_tiled_patching_py.extract_tiles", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.tiling.test_lvae_tiled_patchi... | The function (compute_padding) defined within the public class called public.The function start at line 261 and ends at 297. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [261.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions ... |
CAREamics_careamics | public | public | 0 | 0 | n_tiles_1d | def n_tiles_1d(axis_size: int, tile_size: int, overlap: int) -> int:"""Calculate the number of tiles in a specific dimension.Parameters----------axis_size : intThe length of the data for in a specific dimension.tile_size : intThe length of the tiles in a specific dimension.overlap : intThe tile overlap in a specific di... | 1 | 2 | 3 | 34 | 0 | 300 | 317 | 300 | axis_size,tile_size,overlap | [] | int | {"Expr": 1, "Return": 1} | 2 | 18 | 2 | ["int", "np.ceil"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.tiling.lvae_tiled_patching_py.compute_tile_grid_shape", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.tiling.lvae... | The function (n_tiles_1d) defined within the public class called public.The function start at line 300 and ends at 317. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [300.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called... |
CAREamics_careamics | public | public | 0 | 0 | total_n_tiles | def total_n_tiles(data_shape: tuple[int, ...], tile_size: tuple[int, ...], overlaps: tuple[int, ...]) -> int:"""Calculate The total number of tiles over all dimensions.Parameters----------data_shape : 1D numpy.array of intThe shape of the data to be tiled and stitched together, (S, C, (Z), Y, X).tile_size : 1D numpy.ar... | 2 | 7 | 3 | 79 | 1 | 320 | 345 | 320 | data_shape,tile_size,overlaps | ['result'] | int | {"Assign": 2, "Expr": 1, "For": 1, "Return": 1} | 3 | 26 | 3 | ["range", "len", "n_tiles_1d"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.tiling.test_lvae_tiled_patching_py.test_total_n_tiles"] | The function (total_n_tiles) defined within the public class called public.The function start at line 320 and ends at 345. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [320.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions cal... |
CAREamics_careamics | public | public | 0 | 0 | compute_tile_grid_shape | def compute_tile_grid_shape(data_shape: NDArray[np.int_],tile_size: NDArray[np.int_],overlaps: NDArray[np.int_],) -> tuple[int, ...]:"""Calculate the number of tiles in each dimension.This can be thought of as a grid of tiles.Parameters----------data_shape : 1D numpy.array of intThe shape of the data to be tiled and st... | 3 | 9 | 3 | 101 | 1 | 348 | 375 | 348 | data_shape,tile_size,overlaps | ['shape'] | tuple[int, ...] | {"Assign": 2, "Expr": 1, "For": 1, "Return": 1} | 6 | 28 | 6 | ["range", "len", "range", "len", "n_tiles_1d", "tuple"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.tiling.lvae_tiled_patching_py.compute_padding", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.tiling.lvae_tiled_p... | The function (compute_tile_grid_shape) defined within the public class called public.The function start at line 348 and ends at 375. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [348.0] and does not return any value. It declares 6.0 functions, It has 6.0 fun... |
CAREamics_careamics | public | public | 0 | 0 | _compute_crop_and_stitch_coords_1d | def _compute_crop_and_stitch_coords_1d(axis_size: int, tile_size: int, overlap: int) -> tuple[list[tuple[int, int]], list[tuple[int, int]], list[tuple[int, int]]]:"""Compute the coordinates of each tile along an axis, given the overlap.Parameters----------axis_size : intLength of the axis.tile_size : intSize of the til... | 6 | 39 | 3 | 232 | 5 | 12 | 80 | 12 | axis_size,tile_size,overlap | ['overlap_crop_coords', 'last_tile_end_coord', 'step', 'stitch_coords', 'crop_coords'] | tuple[list[tuple[int, int]], list[tuple[int, int]], list[tuple[int, int]]] | {"Assign": 5, "Expr": 7, "For": 1, "If": 1, "Return": 1} | 9 | 69 | 9 | ["range", "max", "crop_coords.append", "stitch_coords.append", "overlap_crop_coords.append", "crop_coords.append", "max", "stitch_coords.append", "overlap_crop_coords.append"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.tiling.tiled_patching_py.extract_tiles", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset.tiling.test_tiled_patching_py.test... | The function (_compute_crop_and_stitch_coords_1d) defined within the public class called public.The function start at line 12 and ends at 80. It contains 39 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [12.0] and does not return any value. It declares 9.0 functions, It ha... |
CAREamics_careamics | public | public | 0 | 0 | extract_tiles | def extract_tiles(arr: np.ndarray,tile_size: Union[list[int], tuple[int, ...]],overlaps: Union[list[int], tuple[int, ...]],) -> Generator[tuple[np.ndarray, TileInformation], None, None]:"""Generate tiles from the input array with specified overlap.The tiles cover the whole array. The method returns a generator that yie... | 7 | 40 | 3 | 280 | 4 | 83 | 166 | 83 | arr,tile_size,overlaps | ['max_tile_idx', 'tile_info', 'last_tile', 'crop_and_stitch_coords_list'] | Generator[tuple[np.ndarray, TileInformation], None, None] | {"AnnAssign": 2, "Assign": 6, "Expr": 2, "For": 2, "If": 1} | 15 | 84 | 15 | ["range", "_compute_crop_and_stitch_coords_1d", "range", "len", "zip", "np.prod", "len", "enumerate", "zip", "itertools.product", "itertools.product", "itertools.product", "slice", "list", "TileInformation"] | 10 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset.in_memory_tiled_pred_dataset_py.InMemoryTiledPredDataset._prepare_tiles", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.d... | The function (extract_tiles) defined within the public class called public.The function start at line 83 and ends at 166. It contains 40 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [83.0] and does not return any value. It declares 15.0 functions, It has 15.0 functions ca... |
CAREamics_careamics | CareamicsDataset | public | 0 | 1 | __init__ | def __init__(self,data_config: NGDataConfig,mode: Mode,input_extractor: PatchExtractor[GenericImageStack],target_extractor: PatchExtractor[GenericImageStack] | None = None,):self.config = data_configself.mode = modeself.input_extractor = input_extractorself.target_extractor = target_extractorself.patching_strategy = se... | 1 | 14 | 5 | 83 | 0 | 49 | 66 | 49 | self,data_config,mode,input_extractor,target_extractor | [] | None | {"Assign": 7} | 3 | 18 | 3 | ["self._initialize_patching_strategy", "self._initialize_statistics", "self._initialize_transforms"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called CareamicsDataset, that inherit another class.The function start at line 49 and ends at 66. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [49.0] and does not return any value. It declares 3.0 func... |
CAREamics_careamics | CareamicsDataset | public | 0 | 1 | _initialize_patching_strategy | def _initialize_patching_strategy(self) -> PatchingStrategy:patching_strategy: PatchingStrategyif self.mode == Mode.TRAINING:if self.config.patching.name != SupportedPatchingStrategy.RANDOM:raise ValueError(f"Only `random` patching strategy supported during training, got "f"{self.config.patching.name}.")patching_strate... | 9 | 46 | 1 | 246 | 0 | 68 | 116 | 68 | self | [] | PatchingStrategy | {"AnnAssign": 1, "Assign": 4, "If": 7, "Return": 1} | 8 | 49 | 8 | ["ValueError", "RandomPatchingStrategy", "ValueError", "FixedRandomPatchingStrategy", "ValueError", "TilingStrategy", "WholeSamplePatchingStrategy", "ValueError"] | 0 | [] | The function (_initialize_patching_strategy) defined within the public class called CareamicsDataset, that inherit another class.The function start at line 68 and ends at 116. It contains 46 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value. I... |
CAREamics_careamics | CareamicsDataset | public | 0 | 1 | _initialize_transforms | def _initialize_transforms(self) -> Compose | None:normalize = NormalizeModel(image_means=self.input_stats.means,image_stds=self.input_stats.stds,target_means=self.target_stats.means,target_stds=self.target_stats.stds,)if self.mode == Mode.TRAINING:# TODO: initialize normalization separately depending on configurationr... | 2 | 10 | 1 | 82 | 0 | 118 | 130 | 118 | self | [] | Compose | None | {"Assign": 1, "If": 1, "Return": 2} | 4 | 13 | 4 | ["NormalizeModel", "Compose", "list", "Compose"] | 0 | [] | The function (_initialize_transforms) defined within the public class called CareamicsDataset, that inherit another class.The function start at line 118 and ends at 130. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It decl... |
CAREamics_careamics | CareamicsDataset | public | 0 | 1 | _calculate_stats | def _calculate_stats(self, data_extractor: PatchExtractor[GenericImageStack]) -> Stats:image_stats = WelfordStatistics()n_patches = self.patching_strategy.n_patchesfor idx in tqdm(range(n_patches), desc="Computing statistics"):patch_spec = self.patching_strategy.get_patch_spec(idx)patch = data_extractor.extract_patch(d... | 2 | 16 | 2 | 117 | 0 | 132 | 150 | 132 | self,data_extractor | [] | Stats | {"Assign": 5, "Expr": 1, "For": 1, "Return": 1} | 8 | 19 | 8 | ["WelfordStatistics", "tqdm", "range", "self.patching_strategy.get_patch_spec", "data_extractor.extract_patch", "image_stats.update", "image_stats.finalize", "Stats"] | 0 | [] | The function (_calculate_stats) defined within the public class called CareamicsDataset, that inherit another class.The function start at line 132 and ends at 150. It contains 16 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [132.0] and does not return any value. It declar... |
CAREamics_careamics | CareamicsDataset | public | 0 | 1 | _initialize_statistics | def _initialize_statistics(self) -> tuple[Stats, Stats]:if self.config.image_means is not None and self.config.image_stds is not None:input_stats = Stats(self.config.image_means, self.config.image_stds)else:input_stats = self._calculate_stats(self.input_extractor)target_stats = Stats((), ())if self.config.target_means ... | 6 | 11 | 1 | 126 | 0 | 153 | 166 | 153 | self | [] | tuple[Stats, Stats] | {"Assign": 5, "If": 3, "Return": 1} | 5 | 14 | 5 | ["Stats", "self._calculate_stats", "Stats", "Stats", "self._calculate_stats"] | 0 | [] | The function (_initialize_statistics) defined within the public class called CareamicsDataset, that inherit another class.The function start at line 153 and ends at 166. It contains 11 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It decl... |
CAREamics_careamics | CareamicsDataset | public | 0 | 1 | __len__ | def __len__(self):return self.patching_strategy.n_patches | 1 | 2 | 1 | 11 | 0 | 168 | 169 | 168 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3576232_vmware_liota.packages.examples.kura.kura_integrate_iotcc_py.sub_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3665918_alvinwan_neural_backed_decision_trees.nbdt.data.imagenet_py._TinyImagenet200Va... | The function (__len__) defined within the public class called CareamicsDataset, that inherit another class.The function start at line 168 and ends at 169. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 3.0 function... |
CAREamics_careamics | CareamicsDataset | public | 0 | 1 | _create_image_region | def _create_image_region(self, patch: np.ndarray, patch_spec: PatchSpecs, extractor: PatchExtractor) -> ImageRegionData:data_idx = patch_spec["data_idx"]source = extractor.image_stacks[data_idx].sourcereturn ImageRegionData(data=patch,source=str(source),dtype=str(extractor.image_stacks[data_idx].data_dtype),data_shape=... | 1 | 13 | 4 | 89 | 0 | 171 | 184 | 171 | self,patch,patch_spec,extractor | [] | ImageRegionData | {"Assign": 2, "Return": 1} | 3 | 14 | 3 | ["ImageRegionData", "str", "str"] | 0 | [] | The function (_create_image_region) defined within the public class called CareamicsDataset, that inherit another class.The function start at line 171 and ends at 184. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [171.0] and does not return any value. It de... |
CAREamics_careamics | CareamicsDataset | public | 0 | 1 | __getitem__ | def __getitem__(self, index: int) -> Union[tuple[ImageRegionData], tuple[ImageRegionData, ImageRegionData]]:patch_spec = self.patching_strategy.get_patch_spec(index)input_patch = self.input_extractor.extract_patch(data_idx=patch_spec["data_idx"],sample_idx=patch_spec["sample_idx"],coords=patch_spec["coords"],patch_size... | 6 | 38 | 2 | 230 | 0 | 186 | 229 | 186 | self,index | [] | Union[tuple[ImageRegionData], tuple[ImageRegionData, ImageRegionData]] | {"Assign": 8, "If": 3, "Return": 2} | 7 | 44 | 7 | ["self.patching_strategy.get_patch_spec", "self.input_extractor.extract_patch", "self.target_extractor.extract_patch", "self.transforms", "self.transforms", "self._create_image_region", "self._create_image_region"] | 30 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535398_idsia_brainstorm.brainstorm.structure.buffer_views_py.BufferView.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.pypump.models.feed_py.Lists.__getitem__", "_.content.gdriv... | The function (__getitem__) defined within the public class called CareamicsDataset, that inherit another class.The function start at line 186 and ends at 229. It contains 38 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [186.0] and does not return any value. It declares 7.... |
CAREamics_careamics | public | public | 0 | 0 | determine_dataset_type | def determine_dataset_type(data_type: SupportedData,in_memory: bool,read_func: ReadFunc | None = None,image_stack_loader: ImageStackLoader | None = None,) -> DatasetType:"""Determine what the dataset type should be based on the input arguments.Parameters----------data_type : SupportedDataThe underlying datatype.in_memo... | 9 | 32 | 4 | 126 | 0 | 48 | 113 | 48 | data_type,in_memory,read_func,image_stack_loader | [] | DatasetType | {"Expr": 1, "If": 8, "Return": 6} | 3 | 66 | 3 | ["NotImplementedError", "ValueError", "ValueError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.factory_py.create_dataset"] | The function (determine_dataset_type) defined within the public class called public.The function start at line 48 and ends at 113. It contains 32 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [48.0] and does not return any value. It declares 3.0 functions, It has 3.0 funct... |
CAREamics_careamics | public | public | 0 | 0 | create_dataset | def create_dataset(config: NGDataConfig,mode: Mode,inputs: Any,targets: Any,in_memory: bool,read_func: ReadFunc | None = None,read_kwargs: dict[str, Any] | None = None,image_stack_loader: ImageStackLoader | None = None,image_stack_loader_kwargs: dict[str, Any] | None = None,) -> CareamicsDataset[ImageStack]:"""Convenie... | 8 | 42 | 9 | 232 | 4 | 118 | 197 | 118 | config,mode,inputs,targets,in_memory,read_func,read_kwargs,image_stack_loader,image_stack_loader_kwargs | ['dataset_type', 'image_stack_loader_kwargs', 'data_type', 'read_kwargs'] | CareamicsDataset[ImageStack] | {"Assign": 4, "Expr": 1, "If": 7, "Return": 5} | 8 | 80 | 8 | ["SupportedData", "determine_dataset_type", "create_array_dataset", "create_tiff_dataset", "create_czi_dataset", "create_custom_file_dataset", "create_custom_image_stack_dataset", "ValueError"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94533096_lancedb_lancedb.python.python.tests.test_table_py.test_input_data_type", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.lightning.dataset_ng.data_module_py.Careamic... | The function (create_dataset) defined within the public class called public.The function start at line 118 and ends at 197. It contains 42 lines of code and it has a cyclomatic complexity of 8. It takes 9 parameters, represented as [118.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions c... |
CAREamics_careamics | public | public | 0 | 0 | create_array_dataset | def create_array_dataset(config: NGDataConfig,mode: Mode,inputs: Sequence[NDArray[Any]],targets: Sequence[NDArray[Any]] | None,) -> CareamicsDataset[InMemoryImageStack]:"""Create a CAREamicsDataset from array data.Parameters----------config : DataConfig or InferenceConfigThe data configuration.mode : ModeWhether to cre... | 2 | 13 | 4 | 98 | 2 | 200 | 231 | 200 | config,mode,inputs,targets | ['target_extractor', 'input_extractor'] | CareamicsDataset[InMemoryImageStack] | {"AnnAssign": 1, "Assign": 3, "Expr": 1, "If": 1, "Return": 1} | 3 | 32 | 3 | ["create_array_extractor", "create_array_extractor", "CareamicsDataset"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.factory_py.create_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset_ng.dataset.test_dataset_py.test_from_array",... | The function (create_array_dataset) defined within the public class called public.The function start at line 200 and ends at 231. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [200.0] and does not return any value. It declares 3.0 functions, It has 3.0 funct... |
CAREamics_careamics | public | public | 0 | 0 | create_tiff_dataset | def create_tiff_dataset(config: NGDataConfig,mode: Mode,inputs: Sequence[Path],targets: Sequence[Path] | None,) -> CareamicsDataset[InMemoryImageStack]:"""Create a CAREamicsDataset from tiff files that will be all loaded into memory.Parameters----------config : DataConfig or InferenceConfigThe data configuration.mode :... | 2 | 17 | 4 | 96 | 3 | 234 | 269 | 234 | config,mode,inputs,targets | ['target_extractor', 'dataset', 'input_extractor'] | CareamicsDataset[InMemoryImageStack] | {"AnnAssign": 1, "Assign": 4, "Expr": 1, "If": 1, "Return": 1} | 3 | 36 | 3 | ["create_tiff_extractor", "create_tiff_extractor", "CareamicsDataset"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.factory_py.create_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset_ng.dataset.test_dataset_py.test_from_tiff"] | The function (create_tiff_dataset) defined within the public class called public.The function start at line 234 and ends at 269. It contains 17 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [234.0] and does not return any value. It declares 3.0 functions, It has 3.0 functi... |
CAREamics_careamics | public | public | 0 | 0 | create_czi_dataset | def create_czi_dataset(config: NGDataConfig,mode: Mode,inputs: Sequence[Path],targets: Sequence[Path] | None,) -> CareamicsDataset[CziImageStack]:"""Create a dataset from CZI files.Parameters----------config : DataConfig or InferenceConfigThe data configuration.mode : ModeWhether to create the dataset in "training", "v... | 2 | 14 | 4 | 95 | 3 | 272 | 305 | 272 | config,mode,inputs,targets | ['target_extractor', 'dataset', 'input_extractor'] | CareamicsDataset[CziImageStack] | {"AnnAssign": 1, "Assign": 4, "Expr": 1, "If": 1, "Return": 1} | 3 | 34 | 3 | ["create_czi_extractor", "create_czi_extractor", "CareamicsDataset"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.factory_py.create_dataset"] | The function (create_czi_dataset) defined within the public class called public.The function start at line 272 and ends at 305. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [272.0] and does not return any value. It declares 3.0 functions, It has 3.0 functio... |
CAREamics_careamics | public | public | 0 | 0 | create_ome_zarr_dataset | def create_ome_zarr_dataset(config: NGDataConfig,mode: Mode,inputs: Sequence[Path],targets: Sequence[Path] | None,) -> CareamicsDataset[ZarrImageStack]:"""Create a dataset from OME ZARR files.Parameters----------config : DataConfig or InferenceConfigThe data configuration.mode : ModeWhether to create the dataset in "tr... | 2 | 14 | 4 | 95 | 3 | 308 | 341 | 308 | config,mode,inputs,targets | ['target_extractor', 'dataset', 'input_extractor'] | CareamicsDataset[ZarrImageStack] | {"AnnAssign": 1, "Assign": 4, "Expr": 1, "If": 1, "Return": 1} | 3 | 34 | 3 | ["create_ome_zarr_extractor", "create_ome_zarr_extractor", "CareamicsDataset"] | 0 | [] | The function (create_ome_zarr_dataset) defined within the public class called public.The function start at line 308 and ends at 341. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [308.0] and does not return any value. It declares 3.0 functions, and It has 3... |
CAREamics_careamics | public | public | 0 | 0 | create_custom_file_dataset | def create_custom_file_dataset(config: NGDataConfig,mode: Mode,inputs: Sequence[Path],targets: Sequence[Path] | None,*,read_func: ReadFunc,read_kwargs: dict[str, Any],) -> CareamicsDataset[InMemoryImageStack]:"""Create a CAREamicsDataset from custom files that will be all loaded into memory.Parameters----------config :... | 2 | 24 | 6 | 127 | 3 | 344 | 392 | 344 | config,mode,inputs,targets,read_func,read_kwargs | ['target_extractor', 'dataset', 'input_extractor'] | CareamicsDataset[InMemoryImageStack] | {"AnnAssign": 1, "Assign": 4, "Expr": 1, "If": 1, "Return": 1} | 3 | 49 | 3 | ["create_custom_file_extractor", "create_custom_file_extractor", "CareamicsDataset"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.factory_py.create_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset_ng.dataset.test_dataset_py.test_from_custom_... | The function (create_custom_file_dataset) defined within the public class called public.The function start at line 344 and ends at 392. It contains 24 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [344.0] and does not return any value. It declares 3.0 functions, It has 3.0... |
CAREamics_careamics | public | public | 0 | 0 | create_custom_image_stack_dataset | def create_custom_image_stack_dataset(config: NGDataConfig,mode: Mode,inputs: Any,targets: Any | None,image_stack_loader: ImageStackLoader[P, GenericImageStack],*args: P.args,**kwargs: P.kwargs,) -> CareamicsDataset[GenericImageStack]:"""Create a CAREamicsDataset from a custom `ImageStack` class.The custom `ImageStack`... | 2 | 29 | 7 | 122 | 3 | 395 | 451 | 395 | config,mode,inputs,targets,image_stack_loader,*args,**kwargs | ['target_extractor', 'dataset', 'input_extractor'] | CareamicsDataset[GenericImageStack] | {"AnnAssign": 1, "Assign": 4, "Expr": 1, "If": 1, "Return": 1} | 3 | 57 | 3 | ["create_custom_image_stack_extractor", "create_custom_image_stack_extractor", "CareamicsDataset"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.factory_py.create_dataset"] | The function (create_custom_image_stack_dataset) defined within the public class called public.The function start at line 395 and ends at 451. It contains 29 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [395.0] and does not return any value. It declares 3.0 functions, It ... |
CAREamics_careamics | public | public | 0 | 0 | imageregions_to_tileinfos | def imageregions_to_tileinfos(image_regions: Sequence[ImageRegionData],) -> list[tuple[NDArray, list[TileInformation]]]:"""Converts a series of `TileSpecs` dictionaries to `TileInformation` pydantic class.Parameters----------image_regions : sequence of ImageRegionDataA list of ImageRegionData, it must have an instance ... | 10 | 34 | 1 | 238 | 7 | 18 | 79 | 18 | image_regions | ['last_indices', 'unique_data_indices', 'last_tile', 'sample_indices', 'tile_info', 'data', 'tile_specs'] | list[tuple[NDArray, list[TileInformation]]] | {"AnnAssign": 3, "Assign": 8, "Expr": 3, "For": 2, "Return": 1} | 10 | 62 | 10 | ["np.array", "np.unique", "data_image_regions.sort", "np.array", "np.unique", "len", "enumerate", "_imageregion_to_tileinfo", "tile_infos.append", "zip"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset_ng.patching_strategies.test_tiling_strategy_py._test_tiling_output"] | The function (imageregions_to_tileinfos) defined within the public class called public.The function start at line 18 and ends at 79. It contains 34 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value. It declares 10.0 functions, It has 10.0 fun... |
CAREamics_careamics | public | public | 0 | 0 | _imageregion_to_tileinfo | def _imageregion_to_tileinfo(image_region: ImageRegionData, last_tile: bool) -> TileInformation:"""Convert a single `ImageRegionData` instance to a `TileInformation` instance. Whetherit is the last tile in a sequence needs to be supplied.Parameters----------image_region : ImageRegionDataAn instance of `ImageRegionData`... | 4 | 16 | 2 | 71 | 3 | 82 | 125 | 82 | image_region,last_tile | ['tile_spec', 'patch_spec', 'data_shape'] | TileInformation | {"Assign": 3, "Expr": 1, "If": 1, "Return": 1} | 3 | 44 | 3 | ["KeyError", "cast", "_tilespec_to_tileinfo"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.legacy_interoperability_py.imageregions_to_tileinfos"] | The function (_imageregion_to_tileinfo) defined within the public class called public.The function start at line 82 and ends at 125. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [82.0] and does not return any value. It declares 3.0 functions, It has 3.0 fun... |
CAREamics_careamics | public | public | 0 | 0 | _tilespec_to_tileinfo | def _tilespec_to_tileinfo(tile_spec: TileSpecs, data_shape: Sequence[int], last_tile: bool) -> TileInformation:"""Convert a single `TileSpec` to a `TileInformation`. Whether it is the last tileneeds to be supplied.Parameters----------tile_spec : TileSpecsA tile spec dictionary.data_shape : sequence of intThe original s... | 3 | 24 | 3 | 143 | 2 | 128 | 170 | 128 | tile_spec,data_shape,last_tile | ['overlap_crop_coords', 'stitch_coords'] | TileInformation | {"Assign": 2, "Expr": 1, "Return": 1} | 8 | 43 | 8 | ["tuple", "range", "len", "tuple", "range", "len", "TileInformation", "tuple"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.legacy_interoperability_py._imageregion_to_tileinfo"] | The function (_tilespec_to_tileinfo) defined within the public class called public.The function start at line 128 and ends at 170. It contains 24 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [128.0] and does not return any value. It declares 8.0 functions, It has 8.0 func... |
CAREamics_careamics | public | public | 0 | 0 | create_zarr_array | def create_zarr_array(file_path: Path, data_path: str, data: NDArray):store = FsspecStore.from_url(url=file_path.resolve())# create arrayarray = zarr.create(store=store,shape=data.shape,chunks=data.shape,# only 1 chunkdtype=np.uint16,path=data_path,)# write dataarray[...] = datastore.close() | 1 | 11 | 3 | 73 | 2 | 22 | 34 | 22 | file_path,data_path,data | ['array', 'store'] | None | {"Assign": 3, "Expr": 1} | 4 | 13 | 4 | ["FsspecStore.from_url", "file_path.resolve", "zarr.create", "store.close"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.patch_extractor.demo_custom_image_stack_loader_py.create_zarr"] | The function (create_zarr_array) defined within the public class called public.The function start at line 22 and ends at 34. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [22.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions c... |
CAREamics_careamics | public | public | 0 | 0 | create_zarr | def create_zarr(file_path: Path, data_paths: Sequence[str], data: Sequence[NDArray]):for data_path, array in zip(data_paths, data, strict=False):create_zarr_array(file_path=file_path, data_path=data_path, data=array) | 2 | 3 | 3 | 51 | 0 | 37 | 39 | 37 | file_path,data_paths,data | [] | None | {"Expr": 1, "For": 1} | 2 | 3 | 2 | ["zip", "create_zarr_array"] | 0 | [] | The function (create_zarr) defined within the public class called public.The function start at line 37 and ends at 39. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [37.0] and does not return any value. It declares 2.0 functions, and It has 2.0 functions cal... |
CAREamics_careamics | public | public | 0 | 0 | custom_image_stack_loader | def custom_image_stack_loader(source: ZarrSource, axes: str, *args, **kwargs):image_stacks = [ZarrImageStack(store=source["store"], data_path=data_path, axes=axes)for data_path in source["data_paths"]]return image_stacks | 2 | 6 | 4 | 47 | 1 | 79 | 84 | 79 | source,axes,*args,**kwargs | ['image_stacks'] | Returns | {"Assign": 1, "Return": 1} | 1 | 6 | 1 | ["ZarrImageStack"] | 0 | [] | The function (custom_image_stack_loader) defined within the public class called public.The function start at line 79 and ends at 84. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [79.0], and this function return a value. It declare 1.0 function, and It has 1... |
CAREamics_careamics | PatchExtractor | public | 0 | 1 | __init__ | def __init__(self, image_stacks: Sequence[GenericImageStack]):self.image_stacks: list[GenericImageStack] = list(image_stacks) | 1 | 2 | 2 | 25 | 0 | 14 | 15 | 14 | self,image_stacks | [] | None | {"AnnAssign": 1} | 1 | 2 | 1 | ["list"] | 8,182 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi... | The function (__init__) defined within the public class called PatchExtractor, that inherit another class.The function start at line 14 and ends at 15. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [14.0] and does not return any value. It declare 1.0 function... |
CAREamics_careamics | PatchExtractor | public | 0 | 1 | extract_patch | def extract_patch(self,data_idx: int,sample_idx: int,coords: Sequence[int],patch_size: Sequence[int],) -> NDArray:return self.image_stacks[data_idx].extract_patch(sample_idx=sample_idx, coords=coords, patch_size=patch_size) | 1 | 10 | 5 | 52 | 0 | 17 | 26 | 17 | self,data_idx,sample_idx,coords,patch_size | [] | NDArray | {"Return": 1} | 1 | 10 | 1 | ["extract_patch"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.patch_extractor.patch_extractor_py.PatchExtractor.extract_patch"] | The function (extract_patch) defined within the public class called PatchExtractor, that inherit another class.The function start at line 17 and ends at 26. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [17.0] and does not return any value. It declare 1.0 fu... |
CAREamics_careamics | PatchExtractor | public | 0 | 1 | shape | def shape(self):return [stack.data_shape for stack in self.image_stacks] | 2 | 2 | 1 | 17 | 0 | 29 | 30 | 29 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 25 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696065_m_labs_nmigen.nmigen.compat.fhdl.bitcontainer_py.value_bits_sign", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696065_m_labs_nmigen.nmigen.hdl.ast_py.Signal.like", "_.content.gdrive.MyDrive.Phd_Thesis.Dat... | The function (shape) defined within the public class called PatchExtractor, that inherit another class.The function start at line 29 and ends at 30. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It has 25.0 functions cal... |
CAREamics_careamics | public | public | 0 | 0 | create_array_extractor | def create_array_extractor(source: Sequence[NDArray[Any]], axes: str) -> PatchExtractor[InMemoryImageStack]:"""Create a patch extractor from a sequence of numpy arrays.Parameters----------source: sequence of numpy.ndarrayThe source arrays of the data.axes: strThe original axes of the data, must be a subset of "STCZYX".... | 2 | 7 | 2 | 48 | 1 | 25 | 45 | 25 | source,axes | ['image_stacks'] | PatchExtractor[InMemoryImageStack] | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 21 | 2 | ["InMemoryImageStack.from_array", "PatchExtractor"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.factory_py.create_array_dataset", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.tests.dataset_ng.patching_strategies.test_tiling_str... | The function (create_array_extractor) defined within the public class called public.The function start at line 25 and ends at 45. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [25.0] and does not return any value. It declares 2.0 functions, It has 2.0 functio... |
CAREamics_careamics | public | public | 0 | 0 | create_tiff_extractor | def create_tiff_extractor(source: Sequence[Path], axes: str) -> PatchExtractor[InMemoryImageStack]:"""Create a patch extractor from a sequence of TIFF files.Parameters----------source: sequence of PathThe source files for the data.axes: strThe original axes of the data, must be a subset of "STCZYX".Returns-------PatchE... | 2 | 7 | 2 | 45 | 1 | 49 | 69 | 49 | source,axes | ['image_stacks'] | PatchExtractor[InMemoryImageStack] | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 21 | 2 | ["InMemoryImageStack.from_tiff", "PatchExtractor"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.factory_py.create_tiff_dataset"] | The function (create_tiff_extractor) defined within the public class called public.The function start at line 49 and ends at 69. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [49.0] and does not return any value. It declares 2.0 functions, It has 2.0 function... |
CAREamics_careamics | public | public | 0 | 0 | create_ome_zarr_extractor | def create_ome_zarr_extractor(source: Sequence[Path],axes: str,) -> PatchExtractor[ZarrImageStack]:"""Create a patch extractor from a sequence of OME ZARR files.If you have ZARR files that do not follow the OME standard, see documentation onhow to create a custom `image_stack_loader`. (TODO: Add link).Parameters-------... | 2 | 6 | 2 | 40 | 1 | 73 | 96 | 73 | source,axes | ['image_stacks'] | PatchExtractor[ZarrImageStack] | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 24 | 2 | ["ZarrImageStack.from_ome_zarr", "PatchExtractor"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053985_CAREamics_careamics.src.careamics.dataset_ng.factory_py.create_ome_zarr_dataset"] | The function (create_ome_zarr_extractor) defined within the public class called public.The function start at line 73 and ends at 96. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [73.0] and does not return any value. It declares 2.0 functions, It has 2.0 func... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.