autowisp.tests.test_fit_magnitudes module
Class Inheritance Diagram

Define test case for the fit_source_extracted_psf_map step.
- class autowisp.tests.test_fit_magnitudes.TestFitMagnitudes(methodName='runTest')[source]
Bases:
DRTestCase
Tests of the fit_source_extracted_psf_map step.
- _assert_magfit_stat_match(expected_fname, stat_fname)[source]
Assert two magfit statistics files match, in any order of rows.
- _assert_master_reads(master_fname)[source]
Assert the master reads as exactly its photometry tables.
- _assert_masters_as_expected()[source]
Assert the masters and statistics written match the test data’s.
- _assert_masters_built_without(excluded, fit_dr_fnames, subset_dir, subset_masters_dir)[source]
Assert the masters match the subset run’s and record the populations.
- Parameters:
- Returns:
The masters, in order of iteration.
- Return type:
[str]
- _assert_masters_match(expected_fname, master_fname)[source]
Assert two masters match, apart from their population record.
- _assert_population(master_fname, expected)[source]
Assert the master’s INMASTER table holds
{dr_fname: included}.
- _assert_qc_included(dr_fname, included)[source]
Assert every photometry of the DR file records
included.
- _fit_without_and_with_exclusions(excluded)[source]
Fit the images not in
excludedalone, then all excluding those.The list given to the second run names the first excluded file by a relative path, the second by an absolute one, and adds a file that is not among the inputs.
- test_exclusions_kept_out_of_master()[source]
Excluding images gives the master the kept images give alone.
Fits the kept images by themselves, then all images with the others excluded, and compares: the masters and the kept images’ fits must be the same, the excluded images fit at the last pass, each master must list every image fit, flagging the ones it was built from, and each image must record whether it passes the quality cut. The list names one input by a relative path, one by an absolute path, and a file that is not among the inputs, which must not be recorded. Both the new master and one written before exclusions were recorded must read as their photometry tables alone.
- test_existing_files_are_not_overwritten()[source]
A file the first pass would write stops the fit before it starts.
The master and the statistics of the first pass are each put in place alone, as a master built from another single photometric reference named alike would have left them. The step must fail without fitting any image and leave the file as it was.
- test_later_image_fit_like_master_builders()[source]
An image fit against the final master matches its last pass.
Images added after the master photometric reference exists are fit against it alone, and must get exactly the fit that the images which built it got in their last pass, at the same iteration index. One of two such images is on the exclusion list, which changes nothing about its fit, only the quality flag it records.