-
Notifications
You must be signed in to change notification settings - Fork 6
Pdsspecgui
ttrainor edited this page Jan 8, 2012
·
1 revision
This interface can be used for reading spec files and associated images and spectra
- When you read spec files into the workspace the information about the file(s) will be stored in the "reader" instance (see `tdl/Modules/AnaData`_). At the top of the window you can specify a new name for this object; "reader" is the default name.
- This instance will persist in the pds workspace ( e.g. type '>>show' at the command line after you've read in some files). If you come back to the window in a later session just select the "reader" instance from the list (Note if you modify variables at the command line while the window is open, you will likely need to hit the "update" button so the list of variables is updated)
- The update button should also refresh the selected specfile if its been modified
- If you select a spec path (directory location for your spec files) then the list of spec files will be automatically populated with *.spc files in that directory. Selecting the file from the list adds it to the reader instance.
- Alternatively you can select specific spec file(s). Note that this will add the selected file and set spec path, but will not necessarily show other spec files in the directory.
- Once you have selected a file the list of all scan numbers should appear. Select the scan number that you want to read / inspect.
- When you read a scan it will be read into a 'scandata' instance (see `tdl/Modules/AnaData`_). The default name of this instance is "tmp". You can enter any variable name you want, or have the name auto calculated (select the "Auto Calc" and "Long" check boxes then reselect a scan number to see how the variable name changes). If the "Auto Plot" box is checked the data will be plotted upon reading
- Once you've selected a scan number and variable name click Read and the data will be read in (if you read the data into the variable 'tmp' go the the command line and type '>>show tmp')
- Note if you reselect an existing variable name from the list (one that you already read in) you can replot that scan. You might want to hit the update button to refresh the list of possible scan's
- If the "Auto Plot" check box is selected the scan data will be plotted upon reading. In the lower left of the interface you can control how the scaler data is plotted.
- If the "Auto Plot Scaler" button is selected than the scaler data will be plotted upon reading. If the "Default Axes" check box is selected than the first and last column of data in the spec scan are plotted (spec's default for arranging default data).
- You can also customize which columns are plotted from the pull down menu, including selecting a normalization column. You may adjust these and select plot to just change the plot once. Or select new plot axes and deselect the "Default Axes" button to make all subsequent plots the same.
- Note that hold will hold plots for overplotting.
- If the spec scan has associated with it a series of images (e.g. detector images, assuming one file per scan point) these can be read in along with the spec data by selecting the "Read Image" check box. (Note see `tdl/Modules/AnaData`_ for scripting examples and more info)
- By default it is assumed that the image files exist in the following path: spec_file_path/images/SPECFILE/Snnn/SPECFILE.spc_Snnn_yyy.tif where nnn is the scan number, and yyy is the point numbers.
- Files may be read from a non-default path by setting the Image Path. Note however that the file names are still assumed to follow the above convention.
- If the image read is successful the image for the first scan point should be displayed.
- The images for additional scan points can be plotted using the Scan Point selector in the lower right of the display. You may also change the color map for the plotted images here.
- If the spec scan has associated with it a series of spectra (e.g. xrf data, assuming one file per scan point) these can be read in along with the spec data by selecting the "Read Med" or "Read XRF" check box. (Note see `tdl/Modules/AnaData`_ for scripting examples and more info)
- By default it is assumed that the spectra files exist in the following path: spec_file_path/xrf_files/SPECFILE/nnn/SPECFILE.spc_nnn.yyy where nnn is the scan number, and yyy is the point numbers.
- Files may be read from a non-default path by setting the "Med / XRF Path". Note however that the file names are still assumed to follow the above convention.
- If the spectra is read successfully the first scan point should be displayed.
- The spectra for additional scan points can be plotted using the Scan Point selector in the lower right of the display. You may also change ylog and hold buttons to control plotting / over-plotting.
- Note that the med object holds the raw spectra data. The xrf object holds data and information about fitting the data. See `tdl/Modules/XrfData`_ and `tdl/Pds/XrfGui`_ for more information.
- The other options for Med / Xrf read control some processing steps upon reading. For example if your using a multi-element detector data can be 'Totaled', 'Aligned', 'Corrected' for deadtime.
- To exclude certain detectors enter a list of bad detectors (indexing starts at zero). For example [0,1,5] or select a variable from the list holding this data.
- You can also set an energy range for xrf processing and enter a text list of xrf lines. For example ['Fe ka', 'Fe kb'] or select a variable from the list holding this data.
- To apply deadtime corrections you should have detector deadtime values ('Taus'). These can be entered or selected as a variable from the list.
- If the scan you have read in is a deadtime scan you can fit the deadtime curve. Enter a variable name to hold the taus and select the linear axis. That is we assume in a deadtime scan that one axis gives a value which is always linearly related to the detector count rate. See `tdl/Modules/XrfData`_