autowisp.tests.test_master_photref_lookup module

Class Inheritance Diagram

Inheritance diagram of ConfigurationError, DataReductionFile, Image, ImageMasterSelection, ImageProcessingProgress, ImageType, MasterFile, MasterPhotrefProject, MasterType, PhotrefBindingProject, PipelineRun, ProcessedImages, Step, TestBuiltMaster, TestPhotrefNameClash, datetime

Tests for fitting new images against the master their photref built.

The engine gives each fit_magnitudes batch the master photometric reference built from the batch’s single photometric reference, found through the progress of the batch that built it: the images of that progress are bound to the reference. A reference is not registered if its masters would be named like those of another.

The project is the one of test_photref_binding, with more single photometric references next to its ref.

class autowisp.tests.test_master_photref_lookup.MasterPhotrefProject(methodName='runTest')[source]

Bases: PhotrefBindingProject

Inheritance diagram of autowisp.tests.test_master_photref_lookup.MasterPhotrefProject

Adds writing and registering masters, holding no tests itself.

static _register(db_session, master_type, fname, **columns)[source]

Register a master of the given type, return its ID.

classmethod _write_photref(name, channel, exposure, fnum)[source]

Write the DR file of a single photometric reference.

class autowisp.tests.test_master_photref_lookup.TestBuiltMaster(methodName='runTest')[source]

Bases: MasterPhotrefProject

Inheritance diagram of autowisp.tests.test_master_photref_lookup.TestBuiltMaster

Each batch is given the master its own single photref built, if any.

ref1 built a master twice, the first of which was disabled, along with a statistics file. ref2 built one. ref3 built none, though its batch was processed, so has a progress. A master registered outside of any batch was built from no reference the engine knows of.

classmethod _add_progress(db_session, image_name)[source]

Record a fit_magnitudes batch of the image in R, return its ID.

classmethod _fill_database()[source]

Add the references, the batches and the masters they built.

given_masters()[source]

Return {photref: master} the batch of each reference is given.

setUp()[source]

Bind each image to its reference; the base removes bindings.

test_default_names_tell_photrefs_apart()[source]

References of one target, channel and exposure time.

test_each_batch_gets_the_master_its_photref_built()[source]

Not the disabled one, the statistics, or the stand-alone master.

test_two_enabled_masters_of_one_photref_are_refused()[source]

Rather than either being picked.

class autowisp.tests.test_master_photref_lookup.TestPhotrefNameClash(methodName='runTest')[source]

Bases: MasterPhotrefProject

Inheritance diagram of autowisp.tests.test_master_photref_lookup.TestPhotrefNameClash

Under formats naming masters by target, channel and exposure time.

Of the candidates, only the one matching the registered ref in all three would have its masters named like ref’s.

classmethod _config_overwrites()[source]

Add the old formats.

classmethod _fill_database()[source]

Write the candidates, registering none of them.

test_a_refused_photref_is_not_registered()[source]

Nor are any images bound to it.

test_only_the_photref_named_alike_is_refused()[source]

The others differ in channel or exposure time.