PhotometryWorkingDirSettings#
- class stellarphot.settings.PhotometryWorkingDirSettings(settings_file_name='photometry_settings.json')[source]#
Bases:
objectClass to save in-progress and complete photometry settings in the working directory.
- Parameters:
- settings_file_namestr, optional
Name of the settings file. Must end with ‘.json’, contain only alphanumeric characters, hyphens, underscores, and spaces and begin with an alphanumeric character.
Attributes Summary
The partial settings, or None
The full settings, or None
Methods Summary
load()Load full or partial settings.
save(settings[, update])Save the partial or full settings to the working directory.
Attributes Documentation
- partial_settings#
The partial settings, or None
- partial_settings_file#
- settings#
The full settings, or None
- settings_file#
Methods Documentation
- load()[source]#
Load full or partial settings.
- Returns:
- PhotometrySettings | PartialPhotometrySettings | None
The settings loaded from disk, or None if there are no settings files.
- save(settings, update=False)[source]#
Save the partial or full settings to the working directory. Note well that this removes any partial settings file if called with valid full settings.
- Parameters:
- settingsPhotometrySettings
The settings to save.
- updatebool, optional
If True, the settings are updated – see Note below for more description. If False, the settings are overwritten.
Notes
If
updateis True, then the settings are updated. This means that if the settings passed in are partial and there is already a partial setting saved on disk, then the settings from disk that are not in the new settings are added to the new settings.This also means that in the event that the settings in the argument have, say, a
Camera, and the file on disk also has one, the one in the argument is the one that will be kept.Finally, if we are passed a partial setting and there is a full setting on disk, then the partial settings are merged with the full settings, and the full settings are saved.