lsst.pipe.tasks  21.0.0-151-g12957622+e8b61e2e81
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.tasks.ingest.ParseTask Class Reference
Inheritance diagram for lsst.pipe.tasks.ingest.ParseTask:
lsst.pipe.tasks.ingestCalibs.CalibsParseTask

Public Member Functions

def getInfo (self, filename)
 
def getInfoFromMetadata (self, md, info=None)
 
def translate_date (self, md)
 
def translate_filter (self, md)
 
def getDestination (self, butler, info, filename)
 

Static Public Member Functions

def getExtensionName (md)
 

Static Public Attributes

 ConfigClass = ParseConfig
 
 translator_class = None
 

Detailed Description

Task that will parse the filename and/or its contents to get the required information
for putting the file in the correct location and populating the registry.

Definition at line 67 of file ingest.py.

Member Function Documentation

◆ getDestination()

def lsst.pipe.tasks.ingest.ParseTask.getDestination (   self,
  butler,
  info,
  filename 
)
Get destination for the file

@param butler      Data butler
@param info        File properties, used as dataId for the butler
@param filename    Input filename
@return Destination filename

Reimplemented in lsst.pipe.tasks.ingestCalibs.CalibsParseTask.

Definition at line 207 of file ingest.py.

◆ getExtensionName()

def lsst.pipe.tasks.ingest.ParseTask.getExtensionName (   md)
static
 Get the name of a FITS extension.

Parameters
----------
md : `lsst.daf.base.PropertySet`
    FITS header metadata.

Returns
-------
result : `str` or `None`
    The string from the EXTNAME header card if it exists. None otherwise.

Definition at line 126 of file ingest.py.

◆ getInfo()

def lsst.pipe.tasks.ingest.ParseTask.getInfo (   self,
  filename 
)
Get information about the image from the filename and its contents

Here, we open the image and parse the header, but one could also look at the filename itself
and derive information from that, or set values from the configuration.

Parameters
----------
filename : `str`
    Name of file to inspect

Returns
-------
phuInfo : `dict`
    File properties
infoList : `list`
    List of file properties for each extension

Definition at line 80 of file ingest.py.

◆ getInfoFromMetadata()

def lsst.pipe.tasks.ingest.ParseTask.getInfoFromMetadata (   self,
  md,
  info = None 
)
Attempt to pull the desired information out of the header

This is done through two mechanisms:
* translation: a property is set directly from the relevant header keyword
* translator: a property is set with the result of calling a method

The translator methods receive the header metadata and should return the
appropriate value, or None if the value cannot be determined.

@param md      FITS header
@param info    File properties, to be supplemented
@return info

Definition at line 145 of file ingest.py.

◆ translate_date()

def lsst.pipe.tasks.ingest.ParseTask.translate_date (   self,
  md 
)
Convert a full DATE-OBS to a mere date

Besides being an example of a translator, this is also generally useful.
It will only be used if listed as a translator in the configuration.

Definition at line 182 of file ingest.py.

◆ translate_filter()

def lsst.pipe.tasks.ingest.ParseTask.translate_filter (   self,
  md 
)
Translate a full filter description into a mere filter name

Besides being an example of a translator, this is also generally useful.
It will only be used if listed as a translator in the configuration.

Definition at line 194 of file ingest.py.

Member Data Documentation

◆ ConfigClass

lsst.pipe.tasks.ingest.ParseTask.ConfigClass = ParseConfig
static

Definition at line 70 of file ingest.py.

◆ translator_class

lsst.pipe.tasks.ingest.ParseTask.translator_class = None
static

Definition at line 71 of file ingest.py.


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