Skip to content

Make some of the config options optional #67

@oliveira-caio

Description

@oliveira-caio

There are a couple of options that we can use in the config file that I think are too coupled with the code. Meaning: I think they should be optional because not every dataset needs these options and at the moment the code forces one to have them in the config file. There is a caveat that I already mentioned in the issue #66: most of these things are in the ChunkDataset class and maybe we should have more than one template for a dataset. Anyways, imo it is still worth thinking if these things are really needed or can be optional:

  • datasets.py
    • line 329: if I don't have any statistics, this doesn't work. Should one always have statistics? If so, why?
    • line 363: forces one to have transform in the config file.
    • line 457: forces one to have offset in the config file. Probably use get("offset", 0) is a better idea.
    • line 461: forces one to have phase_shifts in the data. Is this extremely necessary? Maybe check before accessing the _phase_shits attribute or set a default value that makes sense for the _phase_shifts? I think this breaks the code if one passes phase_shift_per_signal as False to the SequenceInterpolator and then tries to use it.
  • interpolators.py
    • line 100: forces one to have phase_shift_per_signal in the config file. Maybe change to meta.get('phase_shift_per_signal', False)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions