Exemple #1
0
 def setUp(self):
     self.filters1 = FilterDefinitionCollection(
         FilterDefinition(physical_filter='abc', lambdaEff=123),
         FilterDefinition(physical_filter='def', lambdaEff=456))
     self.filters2 = FilterDefinitionCollection(
         FilterDefinition(physical_filter='abc', lambdaEff=321),
         FilterDefinition(physical_filter='def', lambdaEff=654))
     FilterDefinitionCollection.reset()
Exemple #2
0
 def setUp(self):
     self.filters1 = FilterDefinitionCollection(
         FilterDefinition(physical_filter='abc', lambdaEff=123),
         FilterDefinition(physical_filter='def',
                          band='d',
                          doc="This is a test filter.",
                          lambdaEff=456))
     self.filters2 = FilterDefinitionCollection(
         FilterDefinition(physical_filter='abc', lambdaEff=321),
         FilterDefinition(physical_filter='def', band='dd', lambdaEff=654))
     FilterDefinitionCollection.reset()
Exemple #3
0
class SimpleFitsRawFormatter(FitsRawFormatterBase):
    filterDefinitions = FilterDefinitionCollection()

    @property
    def translatorClass(self):
        return SimpleTestingTranslator

    def getDetector(self, id):
        """Use CameraWrapper to create a fake detector that can map from
        PIXELS to FIELD_ANGLE.

        Always return Detector #10, so all the tests are self-consistent.
        """
        return CameraWrapper().camera.get(10)
Exemple #4
0
class DummyCam(Instrument):

    filterDefinitions = FilterDefinitionCollection()

    @classmethod
    def getName(cls):
        return "DummyCam"

    def getCamera(self):
        return None

    def register(self, registry):
        """Insert Instrument, physical_filter, and detector entries into a
        `Registry`.
        """
        dataId = {
            "instrument": self.getName(),
            "class_name": getFullTypeName(DummyCam)
        }
        with registry.transaction():
            registry.syncDimensionData("instrument", dataId)
            for f in ("dummy_g", "dummy_u"):
                registry.syncDimensionData(
                    "physical_filter",
                    dict(dataId, physical_filter=f, band=f[-1]))
            for d in (1, 2):
                registry.syncDimensionData(
                    "detector", dict(dataId, id=d, full_name=str(d)))

    def getRawFormatter(self, dataId):
        # Docstring inherited fromt Instrument.getRawFormatter.
        return None

    def writeCuratedCalibrations(self, butler):
        pass

    def applyConfigOverrides(self, name, config):
        pass

    def makeDataIdTranslatorFactory(self) -> TranslatorFactory:
        return TranslatorFactory()
Exemple #5
0
LsstCamFiltersBaseline = FilterDefinitionCollection(
    FilterDefinition(physical_filter="empty",
                     band="white",
                     lambdaEff=0.0,
                     alias={"no_filter", "open"}),
    FilterDefinition(physical_filter="u",
                     band="u",
                     lambdaEff=368.48,
                     lambdaMin=320.00,
                     lambdaMax=408.60),
    FilterDefinition(physical_filter="g",
                     band="g",
                     lambdaEff=480.20,
                     lambdaMin=386.40,
                     lambdaMax=567.00),
    FilterDefinition(physical_filter="r",
                     band="r",
                     lambdaEff=623.12,
                     lambdaMin=537.00,
                     lambdaMax=706.00),
    FilterDefinition(physical_filter="i",
                     band="i",
                     lambdaEff=754.17,
                     lambdaMin=676.00,
                     lambdaMax=833.00),
    FilterDefinition(physical_filter="z",
                     band="z",
                     lambdaEff=869.05,
                     lambdaMin=803.00,
                     lambdaMax=938.60),
    FilterDefinition(physical_filter="y",
                     band="y",
                     lambdaEff=973.64,
                     lambdaMin=908.40,
                     lambdaMax=1099.00),
)
Exemple #6
0
DECAM_FILTER_DEFINITIONS = FilterDefinitionCollection(
    FilterDefinition(physical_filter="u DECam c0006 3500.0 1000.0",
                     band="u",
                     lambdaEff=350,
                     lambdaMin=305,
                     lambdaMax=403),
    FilterDefinition(physical_filter="g DECam SDSS c0001 4720.0 1520.0",
                     band="g",
                     lambdaEff=450,
                     lambdaMin=394,
                     lambdaMax=555),
    FilterDefinition(physical_filter="r DECam SDSS c0002 6415.0 1480.0",
                     band="r",
                     lambdaEff=600,
                     lambdaMin=562,
                     lambdaMax=725),
    FilterDefinition(
        physical_filter="i DECam SDSS c0003 7835.0 1470.0",
        band="i",
        lambdaEff=750,
        lambdaMin=699,
        lambdaMax=870,
    ),
    FilterDefinition(physical_filter="z DECam SDSS c0004 9260.0 1520.0",
                     band="z",
                     lambdaEff=900,
                     lambdaMin=837,
                     lambdaMax=1016),
    FilterDefinition(physical_filter="Y DECam c0005 10095.0 1130.0",
                     band="y",
                     lambdaEff=1000,
                     lambdaMin=941,
                     lambdaMax=1080,
                     alias={'Y'}),
    FilterDefinition(
        physical_filter="VR DECam c0007 6300.0 2600.0",
        band="VR",
        doc=
        'A very broad-band filter, intended for "discovery", not "accurate photometry".'
        'For details, wee: http://www.ctio.noao.edu/noao/content/decam-vr-filter',
        lambdaEff=630,
        lambdaMin=490,
        lambdaMax=765),
    FilterDefinition(physical_filter="N964 DECam c0008 9645.0 94.0",
                     band="N964",
                     lambdaEff=964),
    FilterDefinition(physical_filter="solid plate 0.0 0.0",
                     band="opaque",
                     afw_name='SOLID',
                     lambdaEff=0))
Exemple #7
0
MEGAPRIME_FILTER_DEFINITIONS = FilterDefinitionCollection(
    FilterDefinition(physical_filter="u.MP9301",
                     band="u",
                     lambdaEff=374,
                     lambdaMin=336,
                     lambdaMax=412),
    FilterDefinition(physical_filter="u.MP9302",
                     band="u2",
                     alias={"u2"},
                     lambdaEff=354,
                     lambdaMin=310,
                     lambdaMax=397),
    FilterDefinition(physical_filter="u.MP9303",
                     band="u3",
                     lambdaEff=395,
                     lambdaMin=390,
                     lambdaMax=400),
    FilterDefinition(physical_filter="g.MP9401",
                     band="g",
                     lambdaEff=487,
                     lambdaMin=414,
                     lambdaMax=560),
    FilterDefinition(physical_filter="g.MP9402",
                     band="g2",
                     alias={"g2"},
                     lambdaEff=472,
                     lambdaMin=396,
                     lambdaMax=548),
    FilterDefinition(physical_filter="g.MP9501",
                     band="g3",
                     lambdaEff=501,
                     lambdaMin=495,
                     lambdaMax=506),
    FilterDefinition(physical_filter="g.MP9502",
                     band="g4",
                     lambdaEff=511,
                     lambdaMin=506,
                     lambdaMax=516),
    FilterDefinition(physical_filter="r.MP9601",
                     band="r",
                     lambdaEff=628,
                     lambdaMin=567,
                     lambdaMax=689),
    FilterDefinition(physical_filter="r.MP9602",
                     band="r2",
                     alias={"r2"},
                     lambdaEff=640,
                     lambdaMin=566,
                     lambdaMax=714),
    FilterDefinition(physical_filter="r.MP9603",
                     band="r3",
                     lambdaEff=659,
                     lambdaMin=654,
                     lambdaMax=664),
    FilterDefinition(physical_filter="r.MP9604",
                     band="r4",
                     lambdaEff=672,
                     lambdaMin=666,
                     lambdaMax=677),
    FilterDefinition(physical_filter="r.MP9605",
                     band="r5",
                     lambdaEff=611,
                     lambdaMin=400,
                     lambdaMax=821),
    FilterDefinition(
        physical_filter="i.MP9701",
        band="i",
        lambdaEff=778,
        lambdaMin=702,
        lambdaMax=853,
    ),
    FilterDefinition(physical_filter="i.MP9702",
                     band="i2",
                     alias={"i2"},
                     lambdaEff=764,
                     lambdaMin=684,
                     lambdaMax=845),
    FilterDefinition(
        physical_filter="i.MP9703",
        band="i3",
        alias={"i3"},
        lambdaEff=776,
        lambdaMin=696,
        lambdaMax=857,
    ),
    FilterDefinition(physical_filter="z.MP9801",
                     band="z",
                     lambdaEff=1170,
                     lambdaMin=827,
                     lambdaMax=1514),
    FilterDefinition(physical_filter="z.MP9901",
                     band="z2",
                     alias={"z2"},
                     lambdaEff=926,
                     lambdaMin=849,
                     lambdaMax=1002),
)
VIRCAM_FILTER_DEFINITIONS = FilterDefinitionCollection(
    FilterDefinition(band="Clear", physical_filter="NONE", lambdaEff=0,
                     alias=["Clear", "NONE", "None", "Unrecognised", "UNRECOGNISED",
                            "Unrecognized", "UNRECOGNIZED", "NOTSET"]),
    FilterDefinition(physical_filter="VIRCAM-Z",
                     band='Z',
                     lambdaEff=8762.4437058376E-1,
                     lambdaMin=8156.5423076923E-1,
                     lambdaMax=9400.45E-1),
    FilterDefinition(physical_filter="VIRCAM-Y",
                     band='Y',
                     lambdaEff=10184.228370757E-1,
                     lambdaMin=9427.060857538E-1,
                     lambdaMax=10976.565495208E-1),
    FilterDefinition(physical_filter="VIRCAM-J",
                     band='J',
                     lambdaEff=12464.429377059E-1,
                     lambdaMin=11427.444047011E-1,
                     lambdaMax=13759.028571429E-1),
    FilterDefinition(physical_filter="VIRCAM-H",
                     band='H',
                     lambdaEff=16310.014908445E-1,
                     lambdaMin=14603.599766628E-1,
                     lambdaMax=18422.112893276E-1),
    FilterDefinition(physical_filter="VIRCAM-Ks",
    #K Capitalised and without s based on
    #https://github.com/lsst/skymap/blob/master/python/lsst/skymap/packers.py
                     band="K", 
                     lambdaEff=21336.637909756E-1,
                     lambdaMin=19332.653810836E-1,
                     lambdaMax=23674.330024814E-1),
    # Copy pasted from obs_subaru. 
    # Hopefully gen 3 will allow these to be used directly from obs_subaru
    FilterDefinition(physical_filter="HSC-G",
                     band="g",
                     lambdaEff=477, alias={'W-S-G+'}),
    FilterDefinition(physical_filter="HSC-R",
                     band="r",
                     lambdaEff=623, alias={'W-S-R+'}),
    FilterDefinition(physical_filter="HSC-I",
                     band="i",
                     lambdaEff=775, alias={'W-S-I+'}),
    FilterDefinition(physical_filter="HSC-Z",
                     band="z",
                     lambdaEff=925, alias={'W-S-Z+'}),
    FilterDefinition(physical_filter="HSC-Y",
                     band="y",
                     lambdaEff=990, alias={'W-S-ZR'}),
)
Exemple #9
0
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

__all__ = ("MEGAPRIME_FILTER_DEFINITIONS", )

from lsst.obs.base import FilterDefinition, FilterDefinitionCollection

# Filter specification comes from
# https://www.cfht.hawaii.edu/Instruments/Filters/megaprimenew.html

# With current afwFilter singleton we can not define abstract filters
# properly since we are only allowed one u alias.
MEGAPRIME_FILTER_DEFINITIONS = FilterDefinitionCollection(
    FilterDefinition(physical_filter="u.MP9301", band="u"),
    FilterDefinition(physical_filter="u.MP9302", band="u", afw_name="u2"),
    FilterDefinition(physical_filter="u.MP9303", band="u", afw_name="u3"),
    FilterDefinition(physical_filter="g.MP9401", band="g"),
    FilterDefinition(physical_filter="g.MP9402", band="g", afw_name="g2"),
    FilterDefinition(physical_filter="g.MP9501", band="g", afw_name="g3"),
    FilterDefinition(physical_filter="g.MP9502", band="g", afw_name="g4"),
    FilterDefinition(physical_filter="r.MP9601", band="r"),
    FilterDefinition(physical_filter="r.MP9602", band="r", afw_name="r2"),
    FilterDefinition(physical_filter="r.MP9603", band="r", afw_name="r3"),
    FilterDefinition(physical_filter="r.MP9604", band="r", afw_name="r4"),
    FilterDefinition(physical_filter="r.MP9605", band="r", afw_name="r5"),
    FilterDefinition(physical_filter="i.MP9701", band="i"),
    FilterDefinition(physical_filter="i.MP9702", band="i", afw_name="i2"),
    FilterDefinition(physical_filter="i.MP9703", band="i", afw_name="i3"),
    FilterDefinition(physical_filter="z.MP9801", band="z"),
    FilterDefinition(physical_filter="z.MP9901", band="z", afw_name="z2"),
)
Exemple #10
0
HSC_FILTER_DEFINITIONS = FilterDefinitionCollection(
    FilterDefinition(abstract_filter="UNRECOGNISED",
                     physical_filter="NONE",
                     lambdaEff=0,
                     alias=[
                         "NONE", "None", "Unrecognised", "UNRECOGNISED",
                         "Unrecognized", "UNRECOGNIZED", "NOTSET"
                     ]),
    FilterDefinition(physical_filter="HSC-G",
                     abstract_filter="g",
                     lambdaEff=477,
                     alias={'W-S-G+'}),
    FilterDefinition(physical_filter="HSC-R",
                     abstract_filter="r",
                     lambdaEff=623,
                     alias={'W-S-R+'}),
    FilterDefinition(physical_filter="ENG-R1",
                     abstract_filter="r1",
                     lambdaEff=623,
                     alias={'109'}),
    FilterDefinition(physical_filter="HSC-I",
                     abstract_filter="i",
                     lambdaEff=775,
                     alias={'W-S-I+'}),
    FilterDefinition(physical_filter="HSC-Z",
                     abstract_filter="z",
                     lambdaEff=925,
                     alias={'W-S-Z+'}),
    FilterDefinition(physical_filter="HSC-Y",
                     abstract_filter="y",
                     lambdaEff=990,
                     alias={'W-S-ZR'}),
    FilterDefinition(physical_filter="NB0387",
                     abstract_filter='N387',
                     lambdaEff=387),
    FilterDefinition(physical_filter="NB0515",
                     abstract_filter='N515',
                     lambdaEff=515),
    FilterDefinition(physical_filter="NB0656",
                     abstract_filter='N656',
                     lambdaEff=656),
    FilterDefinition(physical_filter="NB0816",
                     abstract_filter='N816',
                     lambdaEff=816),
    FilterDefinition(physical_filter="NB0921",
                     abstract_filter='N921',
                     lambdaEff=921),
    FilterDefinition(physical_filter="NB1010",
                     abstract_filter='N1010',
                     lambdaEff=1010),
    FilterDefinition(physical_filter="SH", abstract_filter='SH', lambdaEff=0),
    FilterDefinition(physical_filter="PH", abstract_filter='PH', lambdaEff=0),
    FilterDefinition(physical_filter="NB0527",
                     abstract_filter='N527',
                     lambdaEff=527),
    FilterDefinition(physical_filter="NB0718",
                     abstract_filter='N718',
                     lambdaEff=718),
    FilterDefinition(physical_filter="IB0945",
                     abstract_filter='I945',
                     lambdaEff=945),
    FilterDefinition(physical_filter="NB0973",
                     abstract_filter='N973',
                     lambdaEff=973),
    FilterDefinition(physical_filter="HSC-I2",
                     abstract_filter="i",
                     afw_name='i2',
                     lambdaEff=775),
    FilterDefinition(physical_filter="HSC-R2",
                     abstract_filter="r",
                     afw_name='r2',
                     lambdaEff=623),
    FilterDefinition(physical_filter="NB0468",
                     abstract_filter='N468',
                     lambdaEff=468),
    FilterDefinition(physical_filter="NB0926",
                     abstract_filter='N926',
                     lambdaEff=926),
    FilterDefinition(physical_filter="NB0400",
                     abstract_filter='N400',
                     lambdaEff=400),
)
Exemple #11
0
__all__ = ("CTMO_FILTER_DEFINITIONS",)

from lsst.obs.base import FilterDefinition, FilterDefinitionCollection

CTMO_FILTER_DEFINITIONS = FilterDefinitionCollection(
    FilterDefinition(
        physical_filter="Clear", band="Clear", lambdaEff=535.5, alias={"Clear"}
    )
)
Exemple #12
0
HSC_FILTER_DEFINITIONS = FilterDefinitionCollection(
    FilterDefinition(band="unknown", physical_filter="unknown",
                     alias=["UNKNOWN", "Unrecognised", "UNRECOGNISED",
                            "Unrecognized", "UNRECOGNIZED", "NOTSET"]),
    FilterDefinition(band="white", physical_filter="empty",
                     alias=["NONE"]),
    FilterDefinition(physical_filter="HSC-G",
                     band="g",
                     alias={'W-S-G+'}),
    FilterDefinition(physical_filter="HSC-R",
                     band="r",
                     doc="Original r-band filter, replaced in July 2016 with HSC-R2.",
                     alias={'W-S-R+'}),
    FilterDefinition(physical_filter="ENG-R1",
                     band="r",
                     doc="A filter used during early camera construction;"
                         "very little data was taken with this filter.",
                     alias={'109'}),
    FilterDefinition(physical_filter="HSC-I",
                     band="i",
                     doc="Original i-band filter, replaced in February 2016 with HSC-I2.",
                     alias={'W-S-I+'}),
    FilterDefinition(physical_filter="HSC-Z",
                     band="z",
                     alias={'W-S-Z+'}),
    FilterDefinition(physical_filter="HSC-Y",
                     band="y",
                     alias={'W-S-ZR'}),
    FilterDefinition(physical_filter="NB0387",
                     band='N387'),
    FilterDefinition(physical_filter="NB0515",
                     band='N515'),
    FilterDefinition(physical_filter="NB0656",
                     band='N656'),
    FilterDefinition(physical_filter="NB0816",
                     band='N816'),
    FilterDefinition(physical_filter="NB0921",
                     band='N921'),
    FilterDefinition(physical_filter="NB1010",
                     band='N1010'),
    FilterDefinition(physical_filter="SH",
                     band='SH',
                     doc="Shack-Hartman filter used for optical alignment."),
    FilterDefinition(physical_filter="PH",
                     band='PH'),
    FilterDefinition(physical_filter="NB0527",
                     band='N527'),
    FilterDefinition(physical_filter="NB0718",
                     band='N718'),
    FilterDefinition(physical_filter="IB0945",
                     band='I945'),
    FilterDefinition(physical_filter="NB0973",
                     band='N973'),
    FilterDefinition(physical_filter="HSC-I2",
                     band="i",
                     doc="A February 2016 replacement for HSC-I, with better uniformity.",
                     afw_name='i2'),
    FilterDefinition(physical_filter="HSC-R2",
                     band="r",
                     doc="A July 2016 replacement for HSC-R, with better uniformity.",
                     afw_name='r2'),
    FilterDefinition(physical_filter="NB0468",
                     band='N468'),
    FilterDefinition(physical_filter="NB0926",
                     band='N926'),
    FilterDefinition(physical_filter="NB0400",
                     band='N400'),
)
Exemple #13
0
DECAM_FILTER_DEFINITIONS = FilterDefinitionCollection(
    FilterDefinition(physical_filter="u DECam c0006 3500.0 1000.0",
                     band="u",
                     lambdaEff=350,
                     lambdaMin=305,
                     lambdaMax=403),
    FilterDefinition(physical_filter="g DECam SDSS c0001 4720.0 1520.0",
                     band="g",
                     lambdaEff=450,
                     lambdaMin=394,
                     lambdaMax=555),
    FilterDefinition(physical_filter="r DECam SDSS c0002 6415.0 1480.0",
                     band="r",
                     lambdaEff=600,
                     lambdaMin=562,
                     lambdaMax=725),
    FilterDefinition(
        physical_filter="i DECam SDSS c0003 7835.0 1470.0",
        band="i",
        lambdaEff=750,
        lambdaMin=699,
        lambdaMax=870,
    ),
    FilterDefinition(physical_filter="z DECam SDSS c0004 9260.0 1520.0",
                     band="z",
                     lambdaEff=900,
                     lambdaMin=837,
                     lambdaMax=1016),
    FilterDefinition(physical_filter="Y DECam c0005 10095.0 1130.0",
                     band="y",
                     lambdaEff=1000,
                     lambdaMin=941,
                     lambdaMax=1080,
                     alias={'Y'}),
    FilterDefinition(physical_filter="VR DECam c0007 6300.0 2600.0",
                     band="VR",
                     lambdaEff=630,
                     lambdaMin=490,
                     lambdaMax=765),
    FilterDefinition(physical_filter="N964 DECam c0008 9645.0 94.0",
                     band="N964",
                     lambdaEff=964),
    FilterDefinition(physical_filter="solid plate 0.0 0.0",
                     afw_name='SOLID',
                     lambdaEff=0))