lsst.pipe.tasks  20.0.0-11-gceefcb08
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.tasks.ingest.IngestTask Class Reference
Inheritance diagram for lsst.pipe.tasks.ingest.IngestTask:
lsst.pipe.tasks.ingestCalibs.IngestCalibsTask lsst.pipe.tasks.ingestPgsql.PgsqlIngestTask lsst.pipe.tasks.ingestCuratedCalibs.IngestCuratedCalibsTask

Public Member Functions

def __init__ (self, *args, **kwargs)
 
def parseAndRun (cls)
 
def prepareTask (cls, root=None, dryrun=False, mode="move", create=False, ignoreIngested=False)
 
def ingest (self, infile, outfile, mode="move", dryrun=False)
 
def isBadFile (self, filename, badFileList)
 
def isBadId (self, info, badIdList)
 
def expandFiles (self, fileNameList)
 Expand a set of filenames and globs, returning a list of filenames. More...
 
def runFile (self, infile, registry, args, pos)
 Examine and ingest a single file. More...
 
def run (self, args)
 
def ingestFiles (self, fileList)
 

Static Public Attributes

 ConfigClass
 
 ArgumentParser
 

Detailed Description

Task that will ingest images into the data repository

Definition at line 386 of file ingest.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.tasks.ingest.IngestTask.__init__ (   self,
args,
**  kwargs 
)

Definition at line 392 of file ingest.py.

Member Function Documentation

◆ expandFiles()

def lsst.pipe.tasks.ingest.IngestTask.expandFiles (   self,
  fileNameList 
)

Expand a set of filenames and globs, returning a list of filenames.

Parameters
fileNameListA list of files and glob patterns

N.b. globs obey Posix semantics, so a pattern that matches nothing is returned unchanged

Definition at line 537 of file ingest.py.

◆ ingest()

def lsst.pipe.tasks.ingest.IngestTask.ingest (   self,
  infile,
  outfile,
  mode = "move",
  dryrun = False 
)
Ingest a file into the image repository.

@param infile  Name of input file
@param outfile Name of output file (file in repository)
@param mode    Mode of ingest (copy/link/move/skip)
@param dryrun  Only report what would occur?
@param Success boolean

Definition at line 458 of file ingest.py.

◆ ingestFiles()

def lsst.pipe.tasks.ingest.IngestTask.ingestFiles (   self,
  fileList 
)
Ingest specified file or list of files and add them to the registry.

This method can only be called if `prepareTask` was used.

Parameters
----------
fileList : `str` or `list` [`str`]
    Pathname or list of pathnames of files to ingest.

Definition at line 612 of file ingest.py.

◆ isBadFile()

def lsst.pipe.tasks.ingest.IngestTask.isBadFile (   self,
  filename,
  badFileList 
)
Return whether the file qualifies as bad

We match against the list of bad file patterns.

Definition at line 512 of file ingest.py.

◆ isBadId()

def lsst.pipe.tasks.ingest.IngestTask.isBadId (   self,
  info,
  badIdList 
)
Return whether the file information qualifies as bad

We match against the list of bad data identifiers.

Definition at line 525 of file ingest.py.

◆ parseAndRun()

def lsst.pipe.tasks.ingest.IngestTask.parseAndRun (   cls)
Parse the command-line arguments and run the Task.

Definition at line 408 of file ingest.py.

◆ prepareTask()

def lsst.pipe.tasks.ingest.IngestTask.prepareTask (   cls,
  root = None,
  dryrun = False,
  mode = "move",
  create = False,
  ignoreIngested = False 
)
Prepare for running the task repeatedly with `ingestFiles`.

Saves the parsed arguments, including the Butler and log, as a
private instance variable.

Parameters
----------
root : `str`, optional
    Repository root pathname.  If None, run the Task using the
    command line arguments, ignoring all other arguments below.
dryrun : `bool`, optional
    If True, don't perform any action; log what would have happened.
mode : `str`, optional
    How files are delivered to their destination.  Default is "move",
    unlike the command-line default of "link".
create : `bool`, optional
    If True, create a new registry, clobbering any old one present.
ignoreIngested : `bool`, optional
    If True, do not complain if the file is already present in the
    registry (and do nothing else).

Returns
-------
task : `IngestTask`
    If `root` was provided, the IngestTask instance

Definition at line 414 of file ingest.py.

◆ run()

def lsst.pipe.tasks.ingest.IngestTask.run (   self,
  args 
)
Ingest all specified files and add them to the registry

Reimplemented in lsst.pipe.tasks.ingestCalibs.IngestCalibsTask, and lsst.pipe.tasks.ingestCuratedCalibs.IngestCuratedCalibsTask.

Definition at line 596 of file ingest.py.

◆ runFile()

def lsst.pipe.tasks.ingest.IngestTask.runFile (   self,
  infile,
  registry,
  args,
  pos 
)

Examine and ingest a single file.

Parameters
infileFile to process
registryRegistry into which to insert Butler metadata, or None
argsParsed command-line arguments
posPosition number of this file in the input list
Returns
parsed information from FITS HDUs if registry is None; or None

Definition at line 556 of file ingest.py.

Member Data Documentation

◆ ArgumentParser

lsst.pipe.tasks.ingest.IngestTask.ArgumentParser
static

Definition at line 389 of file ingest.py.

◆ ConfigClass

lsst.pipe.tasks.ingest.IngestTask.ConfigClass
static

Definition at line 388 of file ingest.py.


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