autowisp.processing_steps.fit_magnitudes module

Class Inheritance Diagram

Inheritance diagram of Component, DataReductionFile, FileKind, ManualStepArgumentParser, MasterFile, RelatedFile, SimpleNamespace, SkyCoord, Transformation, count

Apply magnitude fitting to hdf5 files

autowisp.processing_steps.fit_magnitudes._get_photref_pointing(photref_dr_fname, skytoframe_version, max_photref_separation)[source]

Return (SkyCoord, threshold_deg) for the photref, or None if disabled.

Returns None when max_photref_separation is not finite so callers can skip the per-image range check entirely (used by the ImageProcessingManager path which already filtered during batch preparation).

Parameters:
  • photref_dr_fname (str) – Path to the single photref DR file.

  • skytoframe_version (str) – Version string for the skytoframe group in the DR file.

  • max_photref_separation (float) – Maximum allowed separation in units of the photref’s diagonal FOV. Pass float("inf") to disable.

Returns:

None, or tuple(SkyCoord, float) — photref center and threshold in degrees.

autowisp.processing_steps.fit_magnitudes._within_photref_range(dr_fname, photref_center, threshold_deg, skytoframe_version)[source]

True if DR file’s pointing is within threshold_deg of photref_center.

If the sky-center attribute is absent (astrometry not yet run), the image is included with a warning rather than silently dropped.

Parameters:
  • dr_fname (str) – Path to the image DR file to check.

  • photref_center (SkyCoord) – Sky coordinate of the photref center.

  • threshold_deg (float) – Maximum allowed separation in degrees.

  • skytoframe_version (str) – Version string for the skytoframe group.

Returns:

bool

autowisp.processing_steps.fit_magnitudes.allowed_start_status_values = None

None because this step does not merely check the status – it derives the magfit iteration to continue from out of it (see fit_magnitudes), so it validates the value itself.

autowisp.processing_steps.fit_magnitudes.check_no_master(filename, master_type)[source]

Raise an exception if the given master exists.

autowisp.processing_steps.fit_magnitudes.clean_dr(dr_fname, dr_substitutions)[source]

Remove a magfit iteration from the given DR file.

autowisp.processing_steps.fit_magnitudes.cleanup_interrupted(interrupted, configuration)[source]

Remove DR entries stats and magfit references for magfit_iteration.

autowisp.processing_steps.fit_magnitudes.delete_master(filename, master_type)[source]

Delete the master from file system and database.

autowisp.processing_steps.fit_magnitudes.fit_magnitudes(dr_collection, start_status, configuration, mark_start, mark_end)[source]

Perform magnitude fitting for the given DR files.

autowisp.processing_steps.fit_magnitudes.get_dr_fnames_and_catalog(dr_collection, configuration, sphotref_header, mark_start, mark_end)[source]

Return the DR files to process and the catalog.

autowisp.processing_steps.fit_magnitudes.get_path_substitutions(configuration, sphotref_header)[source]

Return the path substitutions to find magfit datasets.

autowisp.processing_steps.fit_magnitudes.has_apphot(dr_fname, substitutions)[source]

Check if the DR file contains aperture photometry.

autowisp.processing_steps.fit_magnitudes.main()[source]

Run the step from command line.

autowisp.processing_steps.fit_magnitudes.parse_command_line(*args)[source]

Return the parsed command line arguments.