Difference between revisions of "Mas runfile.pro and mas runparam.pro"
From MCEWiki
(→Example usage) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{obsolete|mce_data.py}} | ||
= Overview = | = Overview = | ||
Line 18: | Line 19: | ||
AR1 | AR1 | ||
− | By default, all runfile data | + | By default, all runfile data are returned as a single string. This is true even if the data obviously consist of integer or floating point values. To return a converted result, use the keywords /long or /float: |
− | IDL> gaini = mas_runparam(rf, ' | + | IDL> gaini = mas_runparam(rf, 'SQUID', 'Col0_squid_lockslope_up',/long) |
IDL> help,gaini | IDL> help,gaini | ||
− | GAINI | + | GAINI LONG = Array[33] |
IDL> slope = mas_runparam(rf, 'SQUID', 'Col0_squid_lockslope_up',/float) | IDL> slope = mas_runparam(rf, 'SQUID', 'Col0_squid_lockslope_up',/float) | ||
IDL> print,slope[3] | IDL> print,slope[3] | ||
5.18432 | 5.18432 | ||
+ | |||
+ | [[Category:MCE Script]] | ||
+ | [[Category:IDL]] |
Latest revision as of 16:55, 7 December 2016
- The following describes an obsolete procedure or component. See mce_data.py for a more recent alternative.
Overview
mas_runfile.pro and mas_runparam.pro provide an interface to MCE runfile data.
Example usage
The runfile data is loaded into a runfile structure with a call to mas_runfile. The runfile data can then be accessed by calling mas_runparam with the runfile structure and the name of the block and key desired:
IDL> rf = mas_runfile('1207167414_iv_dm9.run') IDL> help,rf,/struc ** Structure <83f4fcc>, 4 tags, length=13128, data length=13128, refs=1: BLOCKS STRING Array[3] TAG_INDICES LONG Array[3] TAGS STRING Array[1, 545] KEYS STRING Array[1, 545]
IDL> print,mas_runparam(rf, 'FRAMEACQ', 'ARRAY_ID') AR1
By default, all runfile data are returned as a single string. This is true even if the data obviously consist of integer or floating point values. To return a converted result, use the keywords /long or /float:
IDL> gaini = mas_runparam(rf, 'SQUID', 'Col0_squid_lockslope_up',/long) IDL> help,gaini GAINI LONG = Array[33]
IDL> slope = mas_runparam(rf, 'SQUID', 'Col0_squid_lockslope_up',/float) IDL> print,slope[3] 5.18432