1.131. exportObservation

Full Name: herschel.ia.toolbox.util.ExportObservationTask
Alias: exportObservation
Type: Java Task - Java Task
Import: from herschel.ia.toolbox.util import ExportObservationTask
Category

Data access

Description

Exports observations from a pool to an HSA hierarchical directory structure.

The exportObservation task is used to export observations to an HSA hierarchical directory structure, so that they can be easily inspected, used and shared outside of HIPE.

Please note that only LocalStores and HsaReadPools can export their observations.

Example

Example 1: Export the first observation in "myPool" pool to the exportdir directory
mypool = PoolManager.getInstance().get('myPool')
exportObservation(pool=mypool, urn='urn:myPool:herschel.ia.obs.ObservationContext:0', dirout='exportdir', warn=False)

Limitations

  • Only LocalStores and HsaReadPools can export their observations.

  • By default, the dirout should not exist (you cannot safely export to the same dir in the general case), use warn=False if you want to export without being asked.

  • This task will not delete any file it does not create itself.

API details

Properties

ProductPool pool [INPUT, MANDATORY, default=No default value]

The pool to export products from (should be a local store or HSA read pool)

String urn [INPUT, MANDATORY, default=No default value]

The urn that defines what to export

String dirout [INPUT, MANDATORY, default=No default value]

The directory where the observations will be exported to an HSA hierarchical directory structure. Will not be deleted but can be moved via moveTo.

Boolean warn [INPUT, OPTIONAL, default=True]

If true, asks confirmation if the dirout directory already exists and it is not empty.

See also

History

  • 2009-01-16 - JDS: initial version