ButlerGetTests

class lsst.obs.base.butler_tests.ButlerGetTests

Bases: object

Tests of obs_* Butler get() functionality.

In the subclasses’s setUp():
  • Call setUp_butler_get() to fill in required parameters.

Methods Summary

setUp_butler_get([ccdExposureId_bits, ...])

Set up the necessary variables for butlerGet tests.

test_bias()

test_dark()

test_flat()

test_get_linearizer()

Test that we can get a linearizer for good detectorIds.

test_get_linearizer_bad_detectorIds()

Check that bad detectorIds raise.

test_raw()

test_raw_header_wcs()

Test that raw_header_wcs returns the unmodified header of the raw image.

test_subset_raw()

Methods Documentation

setUp_butler_get(ccdExposureId_bits=None, exposureIds=None, filters=None, exptimes=None, detectorIds=None, detector_names=None, detector_serials=None, dimensions=None, sky_origin=None, raw_subsets=None, good_detectorIds=None, bad_detectorIds=None, linearizer_type=None, raw_header_wcs=None)

Set up the necessary variables for butlerGet tests.

All “exposure name” entries below should correspond to an entry in self.dataIds.

Parameters:
ccdExposureId_bitsint

expected value of ccdExposureId_bits

exposureIdsdict

dict of exposure name : ccdExposureId (the number as returned by the butler)

filtersdict

dict of exposure name : filter name

exptimesdict

dict of exposure name : exposure time

detector_namesdict

dict of exposure name : detector name

detectorIdsdict

dict of exposure name : detectorId

detector_serialsdict

dict of exposure name : detector serial

dimensionsdict

dict of exposure name : dimensions (as a geom.Extent2I)

sky_origintuple of float

Longitude, Latitude of ‘raw’ exposure

raw_subsetstuple of (kwargs, int)

keyword args and expected number of subsets for butler.subset('raw', **kwargs)

good_detectorIdslist of int

list of valid ccd numbers

bad_detectorIdslist of int

list of invalid ccd numbers

linearizer_typedict

dict of detectorId (usually int): LinearizerType (e.g. lsst.ip.isr.LinearizeLookupTable.LinearityType), or unittest.SkipTest to skip all linearizer tests.

raw_header_wcslsst.afw.geom.SkyWcs

The SkyWcs object that should be returned by butler.get("raw_header_wcs", dataId=self.dataIds["raw"])

test_bias()
test_dark()
test_flat()
test_get_linearizer()

Test that we can get a linearizer for good detectorIds.

test_get_linearizer_bad_detectorIds()

Check that bad detectorIds raise.

test_raw()
test_raw_header_wcs()

Test that raw_header_wcs returns the unmodified header of the raw image.

test_subset_raw()