SPICE_CREATE_L3_WIDGET - ITA-Solar/solo-spice-ql GitHub Wiki

Description

SPICE_CREATE_L3_WIDGET is the widget to the method SPICE_DATA::create_l3_file. It lets the user select all the possible options before creating the level 3 data and/or file. This widget is used by SPICE_XCONTROL and SPICE_XCONTROL_L23. The widget is modal if a parent widget is provided.

Syntax

result = spice_create_l3_widget( l2_object [, group_leader] [, window_index=window_index] [, /no_masking] [, /approximated_slit] [, /no_fitting] [, /no_widget] [, /position] [, velocity=velocity] [, /official_l3dir] [, top_dir=top_dir] [, /save_not] [, /block_save] )

Return value

The widget, upon being closed, returns a structure with tags:

l3_file

The path and name of the produced level 3 file. This tag will be set to 'Cancel' if the user clicks 'Cancel' instead of 'OK'.

ana

This is a pointer to a CFIT_ANALYSIS structure array. One ANA per processed window.

result_headers

This is a pointer to a pointer array, of which each element contains a string array, the level 3 header of the result extension of one window.

file_saved

A boolean, indicating whether the level 3 file has been saved.

Arguments

l2_object

Either a SPICE_DATA object or a path to a level 2 SPICE FITS file.

Optional Input

group_leader

Widget ID of parent widget. If provided, this widget will be a modal widget.

window_index

One or more window indices that should be checked for processing.

top_dir

A path in which the level 3 file should be saved. If not provided the file will be saved into the $SPICE_DATA directory.

velocity

Set this equal to the initial velocity if you want the line position represented by the velocity relative to a lab wavelength - the lab wavelength is taken from the supplied POSITION, i.e., INT_POS_FWHM(1), which is calculated/estimated within the procedure 'generate_adef'. This input is ignored if /POSITION is set. Default is zero.

Keywords

no_masking

If set, then SPICE_DATA::mask_regions_outside_slit will NOT be called on the data. This procedure masks any y regions in a narrow slit data cube that don't contain slit data, i.e. pixels with contributions from parts of the detector that lie above/below the dumbbells, in the gap between the slit ends and the dumbbells, and the dumbbell regions themselves. The masking procedure is not called for wide-slit observations or if window_index corresponds to a regular dumbbell extension.

approximated_slit

If set, routine uses a fixed (conservative) value for the slit range, i.e. does not estimate the slit length based on the position of the dumbbells.

no_fitting

If set, fitting won't be computed. This can still be done manually in xcfit_block.

no_widget

If set, xcfit_block will not be called.

position

If set, then the line position is NOT represented by the velocity relative to a lab wavelength, but as the wavelength.

official_l3dir

If set, the file will be moved to the directory $SPICE_DATA/level3, the directory for the official level 3 files.

save_not

If set, then the FITS file will not be saved. The output is otherwise the same as if this keyword has not been set.

block_save

If set, then the option to save the FITS file is not shown.

Description of the GUI

Row 1

On the top you see the path and name of the level 2 file, that was provided as input.

Row 2

In this row you can select or deselect all or some data windows. This selection will be passed on to SPICE_DATA::create_l3_file. At least one window has to be selected.

Row 3

This row is for location criteria for the level 3 file.

  • Top directory: Here the user can decide if the path saved in an environmental variable (e.g. SPICE_DATA) should be used as the top directory. Alternatively, the user can give a path directly, either by entering it in the field or by choosing it with the GUI provided when clicking on Change.
  • Save in "user" directory: If activated, the file will be saved into the user directory, which will be added between top directory and level directory.

Row 4

  • Do not run the fit routine: Same as setting the keyword no_fitting. If activated, fitting won't be computed, which can take some minutes. Fitting can still be done later in XCFIT_BLOCK.
  • Do not open xcfit_block: Same as setting the keyword no_widget. If activated, XCFIT_BLOCK will not be called with the result.
  • No masking of dumbbell: Same as setting the keyword no_masking. If activated, the dumbbell will not be masked.
  • Approximate dumbbell maksing: Same as setting the keyword approximated_slit. If activated, the routine uses a fixed (conservative) value for the slit range, i.e. does not estimate the slit length based on the position of the dumbbells.
  • Use position, i.e. fit lambda, not velocity: Same as setting the keyword position. If activated, then the line position is NOT represented by the velocity relative to a lab wavelength, but as the wavelength.
  • velocity: Same as setting the keyword velocity.

Row 5

Here, the user can choose whether the data should be saved into a FITS file. The path and name of the resulting file is given here as well.

Row 6

Clicking on OK will call SPICE_DATA::create_l3_file with the given options. If the user clicks on Cancel, then the widget closes without calling SPICE_DATA::create_l3_file, the output structure won't contain any ANA structures are headers and the l3_file tag is set to 'Cancel'.