lsst.obs.base  19.0.0-25-g78ff95b
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase Class Reference

Public Member Functions

def setUp (self)
 
def tearDown (self)
 
def check_raw (self, gen3Butler, exposure, detector)
 
def check_calibs (self, calibName, calibIds, gen3Butler)
 
def check_defects (self, gen3Butler, detectors)
 
def check_refcat (self, gen3Butler)
 
def check_collections (self, gen3Butler)
 
def test_convert (self)
 

Public Attributes

 gen3root
 
 gen2Butler
 
 cmd
 

Static Public Attributes

string gen2root = ""
 
string gen2calib = ""
 
 instrumentName = None
 
 instrumentClass = None
 
 config = None
 
list biases = []
 
string biasName = "bias"
 
list flats = []
 
string flatName = "flat"
 
list darks = []
 
string darkName = "dark"
 
 args = None
 
list refcats = []
 
 collections = set()
 

Detailed Description

Test the `convert_gen2_repo_to_gen3.py` script.

Subclass this, and then `lsst.utils.tests.TestCase` and set the below
attributes.

Definition at line 40 of file convertTests.py.

Member Function Documentation

◆ check_calibs()

def lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.check_calibs (   self,
  calibName,
  calibIds,
  gen3Butler 
)
Test that we can get converted bias/dark/flat from the gen3 repo.

Note: because there is no clear way to get calibrations from a gen2
repo, we just test that the thing we got is an ExposureF here, and
assume that formatter testing is handled properly elsewhere.

Parameters
----------
calibName : `str`
    The name of the calibration to attempt to get ("bias", "flat").
calibIds : `list` of `dict`
    The list of calibration dataIds to get.
gen3Butler : `lsst.daf.butler.Butler`
    The Butler to use to get the data.

Definition at line 146 of file convertTests.py.

◆ check_collections()

def lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.check_collections (   self,
  gen3Butler 
)
Test that the correct set of collections is in the gen3 repo.

Parameters
----------
gen3Butler : `lsst.daf.butler.Butler`
    The Butler to be tested.

Definition at line 199 of file convertTests.py.

◆ check_defects()

def lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.check_defects (   self,
  gen3Butler,
  detectors 
)
Test that we can get converted defects from the gen3 repo.

Parameters
----------
gen3Butler : `lsst.daf.butler.Butler`
    The Butler to be tested.
detector : `int`
    The detector identifiers to ``get`` from the gen3 butler.

Definition at line 166 of file convertTests.py.

◆ check_raw()

def lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.check_raw (   self,
  gen3Butler,
  exposure,
  detector 
)
Check that a raw was converted correctly.

Parameters
----------
gen3Butler : `lsst.daf.butler.Butler`
    The Butler to be tested.
exposure : `int`
    The exposure/vist identifier ``get`` from both butlers.
detector : `int`
    The detector identifier to ``get`` from both butlers.

Definition at line 120 of file convertTests.py.

◆ check_refcat()

def lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.check_refcat (   self,
  gen3Butler 
)
Test that each expected refcat is in the gen3 repo.

Parameters
----------
gen3Butler : `lsst.daf.butler.Butler`
    The Butler to be tested.

Definition at line 185 of file convertTests.py.

◆ setUp()

def lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.setUp (   self)

Definition at line 93 of file convertTests.py.

◆ tearDown()

def lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.tearDown (   self)

Definition at line 102 of file convertTests.py.

◆ test_convert()

def lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.test_convert (   self)
Test that raws are converted correctly.

Definition at line 209 of file convertTests.py.

Member Data Documentation

◆ args

lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.args = None
static

Definition at line 81 of file convertTests.py.

◆ biases

list lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.biases = []
static

Definition at line 63 of file convertTests.py.

◆ biasName

string lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.biasName = "bias"
static

Definition at line 66 of file convertTests.py.

◆ cmd

lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.cmd

Definition at line 97 of file convertTests.py.

◆ collections

lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.collections = set()
static

Definition at line 88 of file convertTests.py.

◆ config

lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.config = None
static

Definition at line 59 of file convertTests.py.

◆ darkName

string lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.darkName = "dark"
static

Definition at line 78 of file convertTests.py.

◆ darks

list lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.darks = []
static

Definition at line 75 of file convertTests.py.

◆ flatName

string lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.flatName = "flat"
static

Definition at line 72 of file convertTests.py.

◆ flats

list lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.flats = []
static

Definition at line 69 of file convertTests.py.

◆ gen2Butler

lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.gen2Butler

Definition at line 95 of file convertTests.py.

◆ gen2calib

string lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.gen2calib = ""
static

Definition at line 49 of file convertTests.py.

◆ gen2root

string lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.gen2root = ""
static

Definition at line 46 of file convertTests.py.

◆ gen3root

lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.gen3root

Definition at line 94 of file convertTests.py.

◆ instrumentClass

lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.instrumentClass = None
static

Definition at line 55 of file convertTests.py.

◆ instrumentName

lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.instrumentName = None
static

Definition at line 52 of file convertTests.py.

◆ refcats

list lsst.obs.base.gen2to3.convertTests.ConvertGen2To3TestCase.refcats = []
static

Definition at line 84 of file convertTests.py.


The documentation for this class was generated from the following file: