LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.obs.decam._instrument.DarkEnergyCamera Class Reference
Inheritance diagram for lsst.obs.decam._instrument.DarkEnergyCamera:

Public Member Functions

def __init__ (self, **kwargs)
 
def getName (cls)
 
def getCamera (self)
 
def register (self, registry, update=False)
 
def getRawFormatter (self, dataId)
 
TranslatorFactory makeDataIdTranslatorFactory (self)
 

Public Attributes

 configPaths
 

Static Public Attributes

 filterDefinitions = DECAM_FILTER_DEFINITIONS
 
string policyName = "decam"
 
string obsDataPackage = "obs_decam_data"
 

Detailed Description

Definition at line 39 of file _instrument.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.obs.decam._instrument.DarkEnergyCamera.__init__ (   self,
**  kwargs 
)

Definition at line 44 of file _instrument.py.

44  def __init__(self, **kwargs):
45  super().__init__(**kwargs)
46  packageDir = getPackageDir("obs_decam")
47  self.configPaths = [os.path.join(packageDir, "config")]
48 
std::string getPackageDir(std::string const &packageName)
return the root directory of a setup package
Definition: packaging.cc:33

Member Function Documentation

◆ getCamera()

def lsst.obs.decam._instrument.DarkEnergyCamera.getCamera (   self)

Definition at line 53 of file _instrument.py.

53  def getCamera(self):
54  path = os.path.join(getPackageDir("obs_decam"), self.policyName, "camGeom")
55  return self._getCameraFromPath(path)
56 

◆ getName()

def lsst.obs.decam._instrument.DarkEnergyCamera.getName (   cls)

Definition at line 50 of file _instrument.py.

50  def getName(cls):
51  return "DECam"
52 
std::string const & getName() const noexcept
Return a filter's name.
Definition: Filter.h:78

◆ getRawFormatter()

def lsst.obs.decam._instrument.DarkEnergyCamera.getRawFormatter (   self,
  dataId 
)

Definition at line 108 of file _instrument.py.

108  def getRawFormatter(self, dataId):
109  # local import to prevent circular dependency
110  from .rawFormatter import DarkEnergyCameraRawFormatter
111  return DarkEnergyCameraRawFormatter
112 

◆ makeDataIdTranslatorFactory()

TranslatorFactory lsst.obs.decam._instrument.DarkEnergyCamera.makeDataIdTranslatorFactory (   self)

Definition at line 113 of file _instrument.py.

113  def makeDataIdTranslatorFactory(self) -> TranslatorFactory:
114  # Docstring inherited from lsst.obs.base.Instrument.
115  factory = TranslatorFactory()
116  factory.addGenericInstrumentRules(self.getName(), calibFilterType="band",
117  detectorKey="ccdnum")
118  # DECam calibRegistry entries are bands or aliases, but we need
119  # physical_filter in the gen3 registry.
120  factory.addRule(_DecamBandToPhysicalFilterKeyHandler(self.filterDefinitions),
121  instrument=self.getName(),
122  gen2keys=("filter",),
123  consume=("filter",),
124  datasetTypeName="cpFlat")
125  return factory
126 
127 

◆ register()

def lsst.obs.decam._instrument.DarkEnergyCamera.register (   self,
  registry,
  update = False 
)

Definition at line 70 of file _instrument.py.

70  def register(self, registry, update=False):
71  camera = self.getCamera()
72  # Combined with detector_max=100 (below), obsMax=2**25 causes the
73  # number of bits in packed IDs to match the Gen2 ones.
74  obsMax = 2**25
75  with registry.transaction():
76  # Note that detector_max here is really only used for packing
77  # detector and visit/exposure IDs together into a single integer,
78  # so it's rounded up to the nearest power of ten to make that
79  # encoding decodable by humans (and consistent with its previous
80  # Gen2 definition). There are other checks (database constraints)
81  # that ensure any ingested raws have "real" detector values, and
82  # those are based on the detector records added in the loop below.
83  registry.syncDimensionData(
84  "instrument",
85  {
86  "name": self.getName(), "detector_max": 100, "visit_max": obsMax, "exposure_max": obsMax,
87  "class_name": get_full_type_name(self),
88  },
89  update=update
90  )
91 
92  for detector in camera:
93  registry.syncDimensionData(
94  "detector",
95  {
96  "instrument": self.getName(),
97  "id": detector.getId(),
98  "full_name": detector.getName(),
99  "name_in_raft": detector.getName()[1:],
100  "raft": detector.getName()[0],
101  "purpose": str(detector.getType()).split(".")[-1],
102  },
103  update=update
104  )
105 
106  self._registerFilters(registry, update=update)
107 

Member Data Documentation

◆ configPaths

lsst.obs.decam._instrument.DarkEnergyCamera.configPaths

Definition at line 47 of file _instrument.py.

◆ filterDefinitions

lsst.obs.decam._instrument.DarkEnergyCamera.filterDefinitions = DECAM_FILTER_DEFINITIONS
static

Definition at line 40 of file _instrument.py.

◆ obsDataPackage

string lsst.obs.decam._instrument.DarkEnergyCamera.obsDataPackage = "obs_decam_data"
static

Definition at line 42 of file _instrument.py.

◆ policyName

string lsst.obs.decam._instrument.DarkEnergyCamera.policyName = "decam"
static

Definition at line 41 of file _instrument.py.


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