LSST Applications g0265f82a02+c6dfa2ddaf,g1162b98a3f+b2075782a9,g2079a07aa2+1b2e822518,g2bbee38e9b+c6dfa2ddaf,g337abbeb29+c6dfa2ddaf,g3ddfee87b4+a60788ef87,g50ff169b8f+2eb0e556e8,g52b1c1532d+90ebb246c7,g555ede804d+a60788ef87,g591dd9f2cf+ba8caea58f,g5ec818987f+864ee9cddb,g858d7b2824+9ee1ab4172,g876c692160+a40945ebb7,g8a8a8dda67+90ebb246c7,g8cdfe0ae6a+4fd9e222a8,g99cad8db69+5e309b7bc6,g9ddcbc5298+a1346535a5,ga1e77700b3+df8f93165b,ga8c6da7877+aa12a14d27,gae46bcf261+c6dfa2ddaf,gb0e22166c9+8634eb87fb,gb3f2274832+d0da15e3be,gba4ed39666+1ac82b564f,gbb8dafda3b+5dfd9c994b,gbeb006f7da+97157f9740,gc28159a63d+c6dfa2ddaf,gc86a011abf+9ee1ab4172,gcf0d15dbbd+a60788ef87,gdaeeff99f8+1cafcb7cd4,gdc0c513512+9ee1ab4172,ge79ae78c31+c6dfa2ddaf,geb67518f79+ba1859f325,geb961e4c1e+f9439d1e6f,gee10cc3b42+90ebb246c7,gf1cff7945b+9ee1ab4172,w.2024.12
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask Class Reference
Inheritance diagram for lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask:

Public Member Functions

 __init__ (self, initInputs=None, **kwargs)
 
 runQuantum (self, butlerQC, inputRefs, outputRefs)
 

Public Attributes

 fgcmLutMaker
 

Static Public Attributes

 ConfigClass = FgcmMakeLutConfig
 

Protected Member Functions

 _fgcmMakeLut (self, camera, opticsHandle, sensorHandleDict, filterHandleDict)
 
 _getStdPhysicalFilterList (self)
 
 _createLutConfig (self, nCcd)
 
 _loadThroughputs (self, camera, opticsHandle, sensorHandleDict, filterHandleDict)
 
 _getThroughputDetector (self, detector, physicalFilter, throughputLambda)
 
 _makeLutSchema (self, physicalFilterString, stdPhysicalFilterString, atmosphereTableName)
 
 _makeLutCat (self, lutSchema, physicalFilterString, stdPhysicalFilterString, atmosphereTableName)
 

Protected Attributes

 _opticsTransmission
 
 _sensorsTransmission
 
 _filtersTransmission
 

Static Protected Attributes

str _DefaultName = "fgcmMakeLut"
 

Detailed Description

Make Look-Up Table for FGCM.

This task computes a look-up-table for the range in expected atmosphere
variation and variation in instrumental throughput (as tracked by the
transmission_filter products).  By pre-computing linearized integrals,
the FGCM fit is orders of magnitude faster for stars with a broad range
of colors and observing bands, yielding precision at the 1-2 mmag level.

Computing a LUT requires running MODTRAN or with a pre-generated
atmosphere table packaged with fgcm.

Definition at line 324 of file fgcmMakeLut.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask.__init__ ( self,
initInputs = None,
** kwargs )

Definition at line 341 of file fgcmMakeLut.py.

341 def __init__(self, initInputs=None, **kwargs):
342 super().__init__(**kwargs)
343

Member Function Documentation

◆ _createLutConfig()

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask._createLutConfig ( self,
nCcd )
protected
Create the fgcmLut config dictionary

Parameters
----------
nCcd: `int`
   Number of CCDs in the camera

Definition at line 505 of file fgcmMakeLut.py.

505 def _createLutConfig(self, nCcd):
506 """
507 Create the fgcmLut config dictionary
508
509 Parameters
510 ----------
511 nCcd: `int`
512 Number of CCDs in the camera
513 """
514
515 # create the common stub of the lutConfig
516 lutConfig = {}
517 lutConfig['logger'] = self.log
518 lutConfig['filterNames'] = self.config.physicalFilters
519 lutConfig['stdFilterNames'] = self._getStdPhysicalFilterList()
520 lutConfig['nCCD'] = nCcd
521
522 # atmosphereTable already validated if available
523 if self.config.atmosphereTableName is not None:
524 lutConfig['atmosphereTableName'] = self.config.atmosphereTableName
525 else:
526 # use the regular paramters (also validated if needed)
527 lutConfig['elevation'] = self.config.parameters.elevation
528 lutConfig['pmbRange'] = self.config.parameters.pmbRange
529 lutConfig['pmbSteps'] = self.config.parameters.pmbSteps
530 lutConfig['pwvRange'] = self.config.parameters.pwvRange
531 lutConfig['pwvSteps'] = self.config.parameters.pwvSteps
532 lutConfig['o3Range'] = self.config.parameters.o3Range
533 lutConfig['o3Steps'] = self.config.parameters.o3Steps
534 lutConfig['tauRange'] = self.config.parameters.tauRange
535 lutConfig['tauSteps'] = self.config.parameters.tauSteps
536 lutConfig['alphaRange'] = self.config.parameters.alphaRange
537 lutConfig['alphaSteps'] = self.config.parameters.alphaSteps
538 lutConfig['zenithRange'] = self.config.parameters.zenithRange
539 lutConfig['zenithSteps'] = self.config.parameters.zenithSteps
540 lutConfig['pmbStd'] = self.config.parameters.pmbStd
541 lutConfig['pwvStd'] = self.config.parameters.pwvStd
542 lutConfig['o3Std'] = self.config.parameters.o3Std
543 lutConfig['tauStd'] = self.config.parameters.tauStd
544 lutConfig['alphaStd'] = self.config.parameters.alphaStd
545 lutConfig['airmassStd'] = self.config.parameters.airmassStd
546 lutConfig['lambdaRange'] = self.config.parameters.lambdaRange
547 lutConfig['lambdaStep'] = self.config.parameters.lambdaStep
548 lutConfig['lambdaNorm'] = self.config.parameters.lambdaNorm
549
550 # Add any per-filter correction term updates if necessary.
551 # Note that sensorCTerms is the name of the config field in fgcm.
552 if self.config.sensorCorrectionTermDict:
553 lutConfig['sensorCTerms'] = {}
554 for key, value in self.config.sensorCorrectionTermDict.items():
555 lutConfig['sensorCTerms'][key] = (
556 value.refLambda,
557 dict(value.correctionTermDict),
558 )
559
560 return lutConfig
561

◆ _fgcmMakeLut()

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask._fgcmMakeLut ( self,
camera,
opticsHandle,
sensorHandleDict,
filterHandleDict )
protected
Make a FGCM Look-up Table

Parameters
----------
camera : `lsst.afw.cameraGeom.Camera`
    Camera from the butler.
opticsHandle : `lsst.daf.butler.DeferredDatasetHandle`
    Reference to optics transmission curve.
sensorHandleDict : `dict` of [`int`, `lsst.daf.butler.DeferredDatasetHandle`]
    Dictionary of references to sensor transmission curves.  Key will
    be detector id.
filterHandleDict : `dict` of [`str`, `lsst.daf.butler.DeferredDatasetHandle`]
    Dictionary of references to filter transmission curves.  Key will
    be physical filter label.

Returns
-------
retStruct : `lsst.pipe.base.Struct`
    Output structure with keys:

    fgcmLookUpTable : `BaseCatalog`
        The FGCM look-up table.
    fgcmStandardAtmosphere : `lsst.afw.image.TransmissionCurve`
        Transmission curve for the FGCM standard atmosphere.
    fgcmStandardPassbands : `dict` [`str`, `lsst.afw.image.TransmissionCurve`]
        Dictionary of standard passbands, with the key as the
        physical filter name.

Definition at line 376 of file fgcmMakeLut.py.

377 filterHandleDict):
378 """
379 Make a FGCM Look-up Table
380
381 Parameters
382 ----------
383 camera : `lsst.afw.cameraGeom.Camera`
384 Camera from the butler.
385 opticsHandle : `lsst.daf.butler.DeferredDatasetHandle`
386 Reference to optics transmission curve.
387 sensorHandleDict : `dict` of [`int`, `lsst.daf.butler.DeferredDatasetHandle`]
388 Dictionary of references to sensor transmission curves. Key will
389 be detector id.
390 filterHandleDict : `dict` of [`str`, `lsst.daf.butler.DeferredDatasetHandle`]
391 Dictionary of references to filter transmission curves. Key will
392 be physical filter label.
393
394 Returns
395 -------
396 retStruct : `lsst.pipe.base.Struct`
397 Output structure with keys:
398
399 fgcmLookUpTable : `BaseCatalog`
400 The FGCM look-up table.
401 fgcmStandardAtmosphere : `lsst.afw.image.TransmissionCurve`
402 Transmission curve for the FGCM standard atmosphere.
403 fgcmStandardPassbands : `dict` [`str`, `lsst.afw.image.TransmissionCurve`]
404 Dictionary of standard passbands, with the key as the
405 physical filter name.
406 """
407 # number of ccds from the length of the camera iterator
408 nCcd = len(camera)
409 self.log.info("Found %d ccds for look-up table" % (nCcd))
410
411 # Load in optics, etc.
412 self._loadThroughputs(camera,
413 opticsHandle,
414 sensorHandleDict,
415 filterHandleDict)
416
417 lutConfig = self._createLutConfig(nCcd)
418
419 # make the lut object
420 self.log.info("Making the LUT maker object")
421 self.fgcmLutMaker = fgcm.FgcmLUTMaker(lutConfig)
422
423 # generate the throughput dictionary.
424
425 # these will be in Angstroms
426 # note that lambdaStep is currently in nm, because of historical
427 # reasons in the code. Convert to Angstroms here.
428 throughputLambda = np.arange(self.fgcmLutMaker.lambdaRange[0],
429 self.fgcmLutMaker.lambdaRange[1]+self.fgcmLutMaker.lambdaStep*10,
430 self.fgcmLutMaker.lambdaStep*10.)
431
432 self.log.info("Built throughput lambda, %.1f-%.1f, step %.2f" %
433 (throughputLambda[0], throughputLambda[-1],
434 throughputLambda[1] - throughputLambda[0]))
435
436 throughputDict = {}
437 for i, physicalFilter in enumerate(self.config.physicalFilters):
438 tDict = {}
439 tDict['LAMBDA'] = throughputLambda
440 for ccdIndex, detector in enumerate(camera):
441 tDict[ccdIndex] = self._getThroughputDetector(detector, physicalFilter, throughputLambda)
442 throughputDict[physicalFilter] = tDict
443
444 # set the throughputs
445 self.fgcmLutMaker.setThroughputs(throughputDict)
446
447 # make the LUT
448 self.log.info("Making LUT")
449 self.fgcmLutMaker.makeLUT()
450
451 # and save the LUT
452
453 # build the index values
454 comma = ','
455 physicalFilterString = comma.join(self.config.physicalFilters)
456 stdPhysicalFilterString = comma.join(self._getStdPhysicalFilterList())
457
458 atmosphereTableName = 'NoTableWasUsed'
459 if self.config.atmosphereTableName is not None:
460 atmosphereTableName = self.config.atmosphereTableName
461
462 lutSchema = self._makeLutSchema(physicalFilterString, stdPhysicalFilterString,
463 atmosphereTableName)
464
465 lutCat = self._makeLutCat(lutSchema, physicalFilterString,
466 stdPhysicalFilterString, atmosphereTableName)
467
468 atmStd = TransmissionCurve.makeSpatiallyConstant(
469 throughput=self.fgcmLutMaker.atmStdTrans.astype(np.float64),
470 wavelengths=self.fgcmLutMaker.atmLambda.astype(np.float64),
471 throughputAtMin=self.fgcmLutMaker.atmStdTrans[0],
472 throughputAtMax=self.fgcmLutMaker.atmStdTrans[1],
473 )
474
475 fgcmStandardPassbands = {}
476 for i, physical_filter in enumerate(self.fgcmLutMaker.filterNames):
477 passband = self.fgcmLutMaker.throughputs[i]['THROUGHPUT_AVG']*self.fgcmLutMaker.atmStdTrans
478 fgcmStandardPassbands[physical_filter] = TransmissionCurve.makeSpatiallyConstant(
479 throughput=passband.astype(np.float64),
480 wavelengths=self.fgcmLutMaker.atmLambda.astype(np.float64),
481 throughputAtMin=passband[0],
482 throughputAtMax=passband[-1],
483 )
484
485 retStruct = pipeBase.Struct(
486 fgcmLookUpTable=lutCat,
487 fgcmStandardAtmosphere=atmStd,
488 fgcmStandardPassbands=fgcmStandardPassbands,
489 )
490
491 return retStruct
492

◆ _getStdPhysicalFilterList()

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask._getStdPhysicalFilterList ( self)
protected
Get the standard physical filter lists from config.physicalFilters
and config.stdPhysicalFilterOverrideMap

Returns
-------
stdPhysicalFilters : `list`

Definition at line 493 of file fgcmMakeLut.py.

493 def _getStdPhysicalFilterList(self):
494 """Get the standard physical filter lists from config.physicalFilters
495 and config.stdPhysicalFilterOverrideMap
496
497 Returns
498 -------
499 stdPhysicalFilters : `list`
500 """
501 override = self.config.stdPhysicalFilterOverrideMap
502 return [override.get(physicalFilter, physicalFilter) for
503 physicalFilter in self.config.physicalFilters]
504

◆ _getThroughputDetector()

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask._getThroughputDetector ( self,
detector,
physicalFilter,
throughputLambda )
protected
Internal method to get throughput for a detector.

Returns the throughput at the center of the detector for a given filter.

Parameters
----------
detector: `lsst.afw.cameraGeom._detector.Detector`
   Detector on camera
physicalFilter: `str`
   Physical filter label
throughputLambda: `np.array(dtype=np.float64)`
   Wavelength steps (Angstrom)

Returns
-------
throughput: `np.array(dtype=np.float64)`
   Throughput (max 1.0) at throughputLambda

Definition at line 617 of file fgcmMakeLut.py.

617 def _getThroughputDetector(self, detector, physicalFilter, throughputLambda):
618 """Internal method to get throughput for a detector.
619
620 Returns the throughput at the center of the detector for a given filter.
621
622 Parameters
623 ----------
624 detector: `lsst.afw.cameraGeom._detector.Detector`
625 Detector on camera
626 physicalFilter: `str`
627 Physical filter label
628 throughputLambda: `np.array(dtype=np.float64)`
629 Wavelength steps (Angstrom)
630
631 Returns
632 -------
633 throughput: `np.array(dtype=np.float64)`
634 Throughput (max 1.0) at throughputLambda
635 """
636
637 c = detector.getCenter(afwCameraGeom.FOCAL_PLANE)
638 c.scale(1.0/detector.getPixelSize()[0]) # Assumes x and y pixel sizes in arcsec are the same
639
640 throughput = self._opticsTransmission.sampleAt(position=c,
641 wavelengths=throughputLambda)
642
643 throughput *= self._sensorsTransmission[detector.getId()].sampleAt(position=c,
644 wavelengths=throughputLambda)
645
646 throughput *= self._filtersTransmission[physicalFilter].sampleAt(position=c,
647 wavelengths=throughputLambda)
648
649 # Clip the throughput from 0 to 1
650 throughput = np.clip(throughput, 0.0, 1.0)
651
652 return throughput
653

◆ _loadThroughputs()

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask._loadThroughputs ( self,
camera,
opticsHandle,
sensorHandleDict,
filterHandleDict )
protected
Internal method to load throughput data for filters

Parameters
----------
camera: `lsst.afw.cameraGeom.Camera`
    Camera from the butler
opticsHandle : `lsst.daf.butler.DeferredDatasetHandle`
    Reference to optics transmission curve.
sensorHandleDict : `dict` of [`int`, `lsst.daf.butler.DeferredDatasetHandle`]
    Dictionary of references to sensor transmission curves.  Key will
    be detector id.
filterHandleDict : `dict` of [`str`, `lsst.daf.butler.DeferredDatasetHandle`]
    Dictionary of references to filter transmission curves.  Key will
    be physical filter label.

Raises
------
ValueError : Raised if configured filter name does not match any of the
    available filter transmission curves.

Definition at line 562 of file fgcmMakeLut.py.

562 def _loadThroughputs(self, camera, opticsHandle, sensorHandleDict, filterHandleDict):
563 """Internal method to load throughput data for filters
564
565 Parameters
566 ----------
567 camera: `lsst.afw.cameraGeom.Camera`
568 Camera from the butler
569 opticsHandle : `lsst.daf.butler.DeferredDatasetHandle`
570 Reference to optics transmission curve.
571 sensorHandleDict : `dict` of [`int`, `lsst.daf.butler.DeferredDatasetHandle`]
572 Dictionary of references to sensor transmission curves. Key will
573 be detector id.
574 filterHandleDict : `dict` of [`str`, `lsst.daf.butler.DeferredDatasetHandle`]
575 Dictionary of references to filter transmission curves. Key will
576 be physical filter label.
577
578 Raises
579 ------
580 ValueError : Raised if configured filter name does not match any of the
581 available filter transmission curves.
582 """
583 if self.config.doOpticsTransmission:
584 self._opticsTransmission = opticsHandle.get()
585 else:
586 self._opticsTransmission = TransmissionCurve.makeSpatiallyConstant(
587 throughput=np.ones(100),
588 wavelengths=np.linspace(
589 self.config.parameters.lambdaRange[0],
590 self.config.parameters.lambdaRange[1],
591 100,
592 ),
593 throughputAtMin=1.0,
594 throughputAtMax=1.0,
595 )
596
597 self._sensorsTransmission = {}
598 for detector in camera:
599 if self.config.doSensorTransmission:
600 self._sensorsTransmission[detector.getId()] = sensorHandleDict[detector.getId()].get()
601 else:
602 self._sensorsTransmission[detector.getId()] = TransmissionCurve.makeSpatiallyConstant(
603 throughput=np.ones(100),
604 wavelengths=np.linspace(
605 self.config.parameters.lambdaRange[0],
606 self.config.parameters.lambdaRange[1],
607 100,
608 ),
609 throughputAtMin=1.0,
610 throughputAtMax=1.0,
611 )
612
613 self._filtersTransmission = {}
614 for physicalFilter in self.config.physicalFilters:
615 self._filtersTransmission[physicalFilter] = filterHandleDict[physicalFilter].get()
616

◆ _makeLutCat()

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask._makeLutCat ( self,
lutSchema,
physicalFilterString,
stdPhysicalFilterString,
atmosphereTableName )
protected
Make the LUT schema

Parameters
----------
lutSchema: `afwTable.schema`
   Lut catalog schema
physicalFilterString: `str`
   Combined string of all the physicalFilters
stdPhysicalFilterString: `str`
   Combined string of all the standard physicalFilters
atmosphereTableName: `str`
   Name of the atmosphere table used to generate LUT

Returns
-------
lutCat: `afwTable.BaseCatalog`
   Look-up table catalog for persistence.

Definition at line 736 of file fgcmMakeLut.py.

737 atmosphereTableName):
738 """
739 Make the LUT schema
740
741 Parameters
742 ----------
743 lutSchema: `afwTable.schema`
744 Lut catalog schema
745 physicalFilterString: `str`
746 Combined string of all the physicalFilters
747 stdPhysicalFilterString: `str`
748 Combined string of all the standard physicalFilters
749 atmosphereTableName: `str`
750 Name of the atmosphere table used to generate LUT
751
752 Returns
753 -------
754 lutCat: `afwTable.BaseCatalog`
755 Look-up table catalog for persistence.
756 """
757
758 # The somewhat strange format is to make sure that
759 # the rows of the afwTable do not get too large
760 # (see DM-11419)
761
762 lutCat = afwTable.BaseCatalog(lutSchema)
763 lutCat.table.preallocate(14)
764
765 # first fill the first index
766 rec = lutCat.addNew()
767
768 rec['tablename'] = atmosphereTableName
769 rec['elevation'] = self.fgcmLutMaker.atmosphereTable.elevation
770 rec['physicalFilters'] = physicalFilterString
771 rec['stdPhysicalFilters'] = stdPhysicalFilterString
772 rec['pmb'][:] = self.fgcmLutMaker.pmb
773 rec['pmbFactor'][:] = self.fgcmLutMaker.pmbFactor
774 rec['pmbElevation'] = self.fgcmLutMaker.pmbElevation
775 rec['pwv'][:] = self.fgcmLutMaker.pwv
776 rec['o3'][:] = self.fgcmLutMaker.o3
777 rec['tau'][:] = self.fgcmLutMaker.tau
778 rec['lambdaNorm'] = self.fgcmLutMaker.lambdaNorm
779 rec['alpha'][:] = self.fgcmLutMaker.alpha
780 rec['zenith'][:] = self.fgcmLutMaker.zenith
781 rec['nCcd'] = self.fgcmLutMaker.nCCD
782
783 rec['pmbStd'] = self.fgcmLutMaker.pmbStd
784 rec['pwvStd'] = self.fgcmLutMaker.pwvStd
785 rec['o3Std'] = self.fgcmLutMaker.o3Std
786 rec['tauStd'] = self.fgcmLutMaker.tauStd
787 rec['alphaStd'] = self.fgcmLutMaker.alphaStd
788 rec['zenithStd'] = self.fgcmLutMaker.zenithStd
789 rec['lambdaRange'][:] = self.fgcmLutMaker.lambdaRange
790 rec['lambdaStep'] = self.fgcmLutMaker.lambdaStep
791 rec['lambdaStd'][:] = self.fgcmLutMaker.lambdaStd
792 rec['lambdaStdFilter'][:] = self.fgcmLutMaker.lambdaStdFilter
793 rec['i0Std'][:] = self.fgcmLutMaker.I0Std
794 rec['i1Std'][:] = self.fgcmLutMaker.I1Std
795 rec['i10Std'][:] = self.fgcmLutMaker.I10Std
796 rec['i2Std'][:] = self.fgcmLutMaker.I2Std
797 rec['lambdaB'][:] = self.fgcmLutMaker.lambdaB
798 rec['atmLambda'][:] = self.fgcmLutMaker.atmLambda
799 rec['atmStdTrans'][:] = self.fgcmLutMaker.atmStdTrans
800
801 rec['luttype'] = 'I0'
802 rec['lut'][:] = self.fgcmLutMaker.lut['I0'].flatten()
803
804 # and add the rest
805 rec = lutCat.addNew()
806 rec['luttype'] = 'I1'
807 rec['lut'][:] = self.fgcmLutMaker.lut['I1'].flatten()
808
809 derivTypes = ['D_PMB', 'D_LNPWV', 'D_O3', 'D_LNTAU', 'D_ALPHA', 'D_SECZENITH',
810 'D_PMB_I1', 'D_LNPWV_I1', 'D_O3_I1', 'D_LNTAU_I1', 'D_ALPHA_I1',
811 'D_SECZENITH_I1']
812 for derivType in derivTypes:
813 rec = lutCat.addNew()
814 rec['luttype'] = derivType
815 rec['lut'][:] = self.fgcmLutMaker.lutDeriv[derivType].flatten()
816
817 return lutCat

◆ _makeLutSchema()

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask._makeLutSchema ( self,
physicalFilterString,
stdPhysicalFilterString,
atmosphereTableName )
protected
Make the LUT schema

Parameters
----------
physicalFilterString: `str`
   Combined string of all the physicalFilters
stdPhysicalFilterString: `str`
   Combined string of all the standard physicalFilters
atmosphereTableName: `str`
   Name of the atmosphere table used to generate LUT

Returns
-------
lutSchema: `afwTable.schema`

Definition at line 654 of file fgcmMakeLut.py.

655 atmosphereTableName):
656 """
657 Make the LUT schema
658
659 Parameters
660 ----------
661 physicalFilterString: `str`
662 Combined string of all the physicalFilters
663 stdPhysicalFilterString: `str`
664 Combined string of all the standard physicalFilters
665 atmosphereTableName: `str`
666 Name of the atmosphere table used to generate LUT
667
668 Returns
669 -------
670 lutSchema: `afwTable.schema`
671 """
672
673 lutSchema = afwTable.Schema()
674
675 lutSchema.addField('tablename', type=str, doc='Atmosphere table name',
676 size=len(atmosphereTableName))
677 lutSchema.addField('elevation', type=float, doc="Telescope elevation used for LUT")
678 lutSchema.addField('physicalFilters', type=str, doc='physicalFilters in LUT',
679 size=len(physicalFilterString))
680 lutSchema.addField('stdPhysicalFilters', type=str, doc='Standard physicalFilters in LUT',
681 size=len(stdPhysicalFilterString))
682 lutSchema.addField('pmb', type='ArrayD', doc='Barometric Pressure',
683 size=self.fgcmLutMaker.pmb.size)
684 lutSchema.addField('pmbFactor', type='ArrayD', doc='PMB scaling factor',
685 size=self.fgcmLutMaker.pmb.size)
686 lutSchema.addField('pmbElevation', type=np.float64, doc='PMB Scaling at elevation')
687 lutSchema.addField('pwv', type='ArrayD', doc='Preciptable Water Vapor',
688 size=self.fgcmLutMaker.pwv.size)
689 lutSchema.addField('o3', type='ArrayD', doc='Ozone',
690 size=self.fgcmLutMaker.o3.size)
691 lutSchema.addField('tau', type='ArrayD', doc='Aerosol optical depth',
692 size=self.fgcmLutMaker.tau.size)
693 lutSchema.addField('lambdaNorm', type=np.float64, doc='AOD wavelength')
694 lutSchema.addField('alpha', type='ArrayD', doc='Aerosol alpha',
695 size=self.fgcmLutMaker.alpha.size)
696 lutSchema.addField('zenith', type='ArrayD', doc='Zenith angle',
697 size=self.fgcmLutMaker.zenith.size)
698 lutSchema.addField('nCcd', type=np.int32, doc='Number of CCDs')
699
700 # and the standard values
701 lutSchema.addField('pmbStd', type=np.float64, doc='PMB Standard')
702 lutSchema.addField('pwvStd', type=np.float64, doc='PWV Standard')
703 lutSchema.addField('o3Std', type=np.float64, doc='O3 Standard')
704 lutSchema.addField('tauStd', type=np.float64, doc='Tau Standard')
705 lutSchema.addField('alphaStd', type=np.float64, doc='Alpha Standard')
706 lutSchema.addField('zenithStd', type=np.float64, doc='Zenith angle Standard')
707 lutSchema.addField('lambdaRange', type='ArrayD', doc='Wavelength range',
708 size=2)
709 lutSchema.addField('lambdaStep', type=np.float64, doc='Wavelength step')
710 lutSchema.addField('lambdaStd', type='ArrayD', doc='Standard Wavelength',
711 size=len(self.fgcmLutMaker.filterNames))
712 lutSchema.addField('lambdaStdFilter', type='ArrayD', doc='Standard Wavelength (raw)',
713 size=len(self.fgcmLutMaker.filterNames))
714 lutSchema.addField('i0Std', type='ArrayD', doc='I0 Standard',
715 size=len(self.fgcmLutMaker.filterNames))
716 lutSchema.addField('i1Std', type='ArrayD', doc='I1 Standard',
717 size=len(self.fgcmLutMaker.filterNames))
718 lutSchema.addField('i10Std', type='ArrayD', doc='I10 Standard',
719 size=len(self.fgcmLutMaker.filterNames))
720 lutSchema.addField('i2Std', type='ArrayD', doc='I2 Standard',
721 size=len(self.fgcmLutMaker.filterNames))
722 lutSchema.addField('lambdaB', type='ArrayD', doc='Wavelength for passband (no atm)',
723 size=len(self.fgcmLutMaker.filterNames))
724 lutSchema.addField('atmLambda', type='ArrayD', doc='Atmosphere wavelengths (Angstrom)',
725 size=self.fgcmLutMaker.atmLambda.size)
726 lutSchema.addField('atmStdTrans', type='ArrayD', doc='Standard Atmosphere Throughput',
727 size=self.fgcmLutMaker.atmStdTrans.size)
728
729 # and the look-up-tables
730 lutSchema.addField('luttype', type=str, size=20, doc='Look-up table type')
731 lutSchema.addField('lut', type='ArrayF', doc='Look-up table for luttype',
732 size=self.fgcmLutMaker.lut['I0'].size)
733
734 return lutSchema
735
Defines the fields and offsets for a table.
Definition Schema.h:51

◆ runQuantum()

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask.runQuantum ( self,
butlerQC,
inputRefs,
outputRefs )

Definition at line 344 of file fgcmMakeLut.py.

344 def runQuantum(self, butlerQC, inputRefs, outputRefs):
345 camera = butlerQC.get(inputRefs.camera)
346
347 if self.config.doOpticsTransmission:
348 opticsHandle = butlerQC.get(inputRefs.transmission_optics)
349 else:
350 opticsHandle = None
351
352 if self.config.doSensorTransmission:
353 sensorHandles = butlerQC.get(inputRefs.transmission_sensor)
354 sensorHandleDict = {sensorHandle.dataId['detector']: sensorHandle for
355 sensorHandle in sensorHandles}
356 else:
357 sensorHandleDict = {}
358
359 filterHandles = butlerQC.get(inputRefs.transmission_filter)
360 filterHandleDict = {filterHandle.dataId['physical_filter']: filterHandle for
361 filterHandle in filterHandles}
362
363 struct = self._fgcmMakeLut(camera,
364 opticsHandle,
365 sensorHandleDict,
366 filterHandleDict)
367
368 butlerQC.put(struct.fgcmLookUpTable, outputRefs.fgcmLookUpTable)
369 butlerQC.put(struct.fgcmStandardAtmosphere, outputRefs.fgcmStandardAtmosphere)
370
371 refDict = {passbandRef.dataId['physical_filter']: passbandRef for
372 passbandRef in outputRefs.fgcmStandardPassbands}
373 for physical_filter, passband in struct.fgcmStandardPassbands.items():
374 butlerQC.put(passband, refDict[physical_filter])
375

Member Data Documentation

◆ _DefaultName

str lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask._DefaultName = "fgcmMakeLut"
staticprotected

Definition at line 339 of file fgcmMakeLut.py.

◆ _filtersTransmission

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask._filtersTransmission
protected

Definition at line 613 of file fgcmMakeLut.py.

◆ _opticsTransmission

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask._opticsTransmission
protected

Definition at line 584 of file fgcmMakeLut.py.

◆ _sensorsTransmission

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask._sensorsTransmission
protected

Definition at line 597 of file fgcmMakeLut.py.

◆ ConfigClass

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask.ConfigClass = FgcmMakeLutConfig
static

Definition at line 338 of file fgcmMakeLut.py.

◆ fgcmLutMaker

lsst.fgcmcal.fgcmMakeLut.FgcmMakeLutTask.fgcmLutMaker

Definition at line 421 of file fgcmMakeLut.py.


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