getModifiedIsprintString (
self,
filename,
parmList,
filterList=None,
recordListingStyle=0,
)
getModifiedIsprintString extends the maddata engine by allowing any possible filter.
getModifiedIsprintString is a function that expands the maddata engine by allowing filtering to include all
possible logical expression involving any Madrigal parameters.
Inputs:
filename - full path to madrigal file.
parmList - a list of mnemonic or integer parameters.
filterList - a list of strings filtering the output. They must only contain parameters in mnemonic
form that are included in the parmList. See example below for examples. Defaults to None.
recordListingStyle - If 0 (the default), show record summary and all data that meet all filters.
If 1, show only the record summary of any record that contains any 2d data that meets all the
filters. If 2, show only any 2d data that meets all the filters without record headers.
Returns: String containing report formatted in isprint fashion, or empty string if no data.
Affects: None
Exceptions: If any item in filterList is not a valid logical expression.
Usage example:
import madrigal.ui.isprintExe
test = madrigal.ui.isprintExe.MadrigalIsprintExe()
filepath = os.environ.get('MADROOT') + '/experiments/1998/mlh/20jan98/mil980120g.003'
parmList = ['range', 'ti', 'TN', 'kinst']
filterList = ['range > 900 and ti > 2000', 'ti < 2500']
result = test.getModifiedIsprintString(filename, parmList, filterList)
print result
|