1.3. accessHkParam

Full Name: herschel.hifi.dp.access.AccessHkParamTask
Alias: accessHkParam
Type: Java Task -
Import: from herschel.hifi.dp.access import AccessHkParamTask
Category:

HIFI/Pipeline/ICC

Description

AccessHkParamTask

Allow direct parameter retrieval from TmSourcePackets in the database(s).It should be noted that one must remain connected to the database as the objects are not initially loaded in ones session until you actual try and use them. Only references are returned initially. The loss of the connection to a database will result in not being able to use the objects from the database and may require you to restart your IA session. This ICC task is required in order to run the pipeline but is not intended for astronomer use

Example

Example 1: AccessHkParamTask
 
# Usage: Command line
#
from herschel.hifi.dp.access import AccessHkParamTask
ahpt = AccessHkParamTask()
#
ahpt(db=ilt_fm_5_prop@iccdb.sron.rug.nl, obsid=268505167, apid=2017, params = ["FPU_room_temp", "FPU_shutter_temp"])
composite=ahpt.paramresult
print composite
#
# or, only using one parameter
ahpt(obsid=268505167, apid=2017, param="FPU_room_temp")
# or, including a screenshot per 10 secs ( no averaging done ):
ahpt(obsid=268505167, apid=2017, param="FPU_room_temp", resolution=10)
# or, including more than one parameter 
ahpt(obsid=268505167, apid=2017, params = ["FPU_room_temp", "FPU_shutter_temp"], resolution=10)
# or, including a resolution for each parameter:
ahpt(obsid=268505167, apid=2017, params = ["FPU_room_temp", "FPU_shutter_temp"], resolutions=[1,10])
# Translating your parameters into a query (i.e. apid / type / subtype / SID) such that the query returns only packets of interest
# This is introduced to constrain the number of packets on the client side to lower the risk of memory problems:
ahpt(obsid=268505167, p2q=1, params = ["FPU_room_temp", "FPU_shutter_temp"], resolutions=[1,10])
#
# Usage: GUI
# In the gui select: database=ilt_fm_5_prop@iccdb.sron.rug.nl, obsid=268505167, apid=2017, param=FPU_room_temp
#
ahpt = AccessHkParamTask()
ahpt.gui = 1
composite = ahpt.paramresult
print composite
print composite['FPU_room_temp'].getColumn("time_conv")
tbl1 = composite.get("FPU_room_temp")
PlotXY(tbl1.getColumn("time_conv").getData(),tbl1.getColumn("conv").getData())

API Summary

Properties
Long bbtype [INPUT, OPTIONAL, default=null]
Long obsid [INPUT, OPTIONAL, default=null]
Integer apid [INPUT, OPTIONAL, default=null]
Integer[] apids [INPUT, OPTIONAL, default=null]
Integer type [INPUT, OPTIONAL, default=null]
Integer[] types [INPUT, OPTIONAL, default=null]
Integer[] subtypes [INPUT, OPTIONAL, default=null]
Integer sid [INPUT, OPTIONAL, default=null]
Integer[] sids [INPUT, OPTIONAL, default=null]
String db [INPUT, OPTIONAL, default=null]
FineTime start [INPUT, OPTIONAL, default=null]
FineTime end [INPUT, OPTIONAL, default=null]
Boolean exit [INPUT, OPTIONAL, default=false]
Boolean gui [INPUT, OPTIONAL, default=false]
Boolean dialog [INPUT, OPTIONAL, default=false]
Boolean cancel [INPUT, OPTIONAL, default=false]
String param [INPUT, OPTIONAL, default=null]
String[] params [INPUT, OPTIONAL, default=null]
Boolean p2q [INPUT, OPTIONAL, default=false]
Double resolution [INPUT, OPTIONAL, default=null]
double[] resolutions [INPUT, OPTIONAL, default=null]
ProductReader reader [OUTPUT, OPTIONAL, default=null]
CompositeDataset paramresult [OUTPUT, OPTIONAL, default=null]

Limitations

The amount of data that can be loaded is limited to size of ones java heap space.

API details

Properties

Long bbtype [INPUT, OPTIONAL, default=null]
 

Provides the Building block id.

Long obsid [INPUT, OPTIONAL, default=null]
 

Provides the Observation id.

Integer apid [INPUT, OPTIONAL, default=null]
 

Provides the apid.

Integer[] apids [INPUT, OPTIONAL, default=null]
 

Provides an array of apids.

Integer type [INPUT, OPTIONAL, default=null]
 

Provides the type.

Integer[] types [INPUT, OPTIONAL, default=null]
 

Provides an array of types.

Integer[] subtypes [INPUT, OPTIONAL, default=null]
 

Provides an array of subtypes.

Integer sid [INPUT, OPTIONAL, default=null]
 

Provides the sid.

Integer[] sids [INPUT, OPTIONAL, default=null]
 

Provides an array of sids.

String db [INPUT, OPTIONAL, default=null]
 

Provides the name of the database to access.

FineTime start [INPUT, OPTIONAL, default=null]
 

Provides the start time.

FineTime end [INPUT, OPTIONAL, default=null]
 

Provides the end time.

Boolean exit [INPUT, OPTIONAL, default=false]
 

Provides a handle to exit gui.

Boolean gui [INPUT, OPTIONAL, default=false]
 

Allows to handle task using a gui.

Boolean dialog [INPUT, OPTIONAL, default=false]
 

Allows to define parameters using a GUI.

Boolean cancel [INPUT, OPTIONAL, default=false]
 

Provides a handle to exit gui.

String param [INPUT, OPTIONAL, default=null]
 

Provides a single parameter id.

String[] params [INPUT, OPTIONAL, default=null]
 

Provides an array of parameter ids.

Boolean p2q [INPUT, OPTIONAL, default=false]
 

p2q = Boolean.TRUE will translate the parameters into a specific query only returning those packets which contain the requested parameter. This is used when searching large numbers of packets were the amount of computer memory is an issue. It has been shown that setting this can slow down database access for remote users.

Double resolution [INPUT, OPTIONAL, default=null]
 

Provides a way to set the resolution in secs for a single parameter (or more -, as being passed by the taskparameter: params).

double[] resolutions [INPUT, OPTIONAL, default=null]
 

Provides a way to set the resolution in secs for each param as passed by the taskparameter: params .

ProductReader reader [OUTPUT, OPTIONAL, default=null]
 

Alternate output for database query access. A reader for a stream of HK Packets

CompositeDataset paramresult [OUTPUT, OPTIONAL, default=null]
 

Returns an composite containing a tabledataset containing parameter values passed for the packets collected from the database.

History

  • 2010-10-22 - KE: change doc format for help support.