autowisp.tests.test_engine_exclusions module

Class Inheritance Diagram

Inheritance diagram of ConfigurationError, DataReductionFile, DiagnosticType, Image, ImageMasterSelection, ImageProcessingManager, LightCurveProcessingManager, MasterType, PhotometryDiagnostics, PhotrefBindingProject, TestEngineExclusions

Tests for the engine turning exclusion rules into the steps’ lists.

Before fit_magnitudes the engine lists the DR files of a batch the magfit-exclusion-rule leaves out, and before epd and tfa the observations of a single photometric reference the step’s rule leaves out, by the values of the tfa-observation-id datasets. What a rule decides is tested in test_exclusion_rules; these check what the engine asks it and what it makes of the answer.

The project is the one of test_photref_binding, with a background that differs between the channels, and a DR file for every observation, whose header the engine reads the observation ids from.

class autowisp.tests.test_engine_exclusions.TestEngineExclusions(methodName='runTest')[source]

Bases: PhotrefBindingProject

Inheritance diagram of autowisp.tests.test_engine_exclusions.TestEngineExclusions

The lists the engine hands fit_magnitudes, epd and tfa.

classmethod _fill_database()[source]

Add the diagnostics, and a DR file for every observation.

detrending_excluded(step, configuration, bound)[source]

Return what the engine lists for step of the single photref.

Parameters:
  • step (str) – The lightcurve step to ask for.

  • configuration (dict) – Its configuration.

  • bound – (image name, channel) bound to the single photref while the engine is asked, and no longer.

dr(*members)[source]

Return the DR files of the given (image name, channel).

magfit_excluded(rule, members, *, master=None, step=None)[source]

Return what the engine lists for fit_magnitudes of a batch.

Parameters:
  • rule (str or None) – The magfit-exclusion-rule.

  • members – (image name, channel) of the batch.

  • master (str or None) – The existing master photometric reference the batch is fit against, if any.

  • step (str or None) – The step to ask for, by default fit_magnitudes.

test_detrending_ids_must_be_header_keywords()[source]

Which is all the engine can read for an image.

test_detrending_lists_observation_ids()[source]

Of the observations bound to the photref, in any channel.

far in G is excluded by the rule but bound to nothing, so is not fit with this photref, and is not listed.

test_detrending_lists_the_photometry_a_slot_decides()[source]

Each observation under every photometry it is excluded in.

far in R is excluded in both apertures, so listed twice, and longer in neither.

test_detrending_without_a_rule_lists_nothing()[source]

Unset, or set only for the other step, or a step taking none.

test_magfit_cannot_read_its_own_diagnostics()[source]

The engine says it is deciding before magnitude fitting.

test_magfit_lists_every_channel_of_an_image_excluded()[source]

A rule quoting a channel decides for every channel in the batch.

test_magfit_lists_the_dr_files_a_slot_excludes()[source]

Each channel is decided on its own background.

Against an existing master too: nothing is built from the batch then, but its DR files record the verdict.

test_magfit_without_a_rule_to_apply_lists_nothing()[source]

Unset, or for another step.