-
Notifications
You must be signed in to change notification settings - Fork 1
SPICE_DATA::create_l3_file
Source code: SPICE_DATA::create_l3_file
Class: SPICE_DATA
This routine creates a level 3 FITS file for the chosen window(s). If the window is a Dumbbell or an Intensity-window no fits are made. The data is arranged so that cfit_block can read it. The routine either estimates the positions of the main peaks or uses a line list to define the peaks and fits those to the data by calling cfit_block. This may take a while. After that, the xcfit_block routine is called with the data and the fit, where one can view the result and make adjustments to the fit. After exiting xcfit_block by using the 'Exit' button, the routine saves the fits into a level 3 FITS file and moves this file into the $SPICE_DATA/user/level3/ directory. The resulting file will by default contain only one extension per window, the RESULTS extension. The DATA is linked to the level 2 file as an external extension. RESIDUALS and LAMBDA can be reconstructed when reading the file, and WEIGHTS, INCLUDE and CONSTANT are only saved if they contain non-default values.
l3_filename = spice_object->create_l3_file( [window] [, /no_masking] [, /approximated_slit]
[, /no_fitting] [, /no_widget] [, /no_xcfit_block] [, /position] [, velocity=velocity]
[, /no_line_list] [, force_version=force_version]
[, top_dir=top_dir] [, path_index=path_index] [, /save_not]
[, all_ana=all_ana] [, all_result_headers=all_result_headers] [, all_data_headers=all_data_headers]
[, all_proc_steps=all_proc_steps]
[, /SAVE_XDIM1] [, /PRINT_HEADERS]
[, progress_widget=progress_widget]
[, group_leader=group_leader] [, pipeline_dir=pipeline_dir] [, /quiet] )
The path and name of the Level 3 FITS file. And a level 3 FITS file, saved to directory $SPICE_DATA/user/level3/ .
A scalar or an array of integers or strings, giving the indices or names of the window(s) to be analysed. Default is all windows if this is input is not provided.
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.
A path to a directory in which the file should be saved. The necessary subdirectories will be created (e.g. level2/2020/06/21).
If $SPICE_DATA contains multiple paths, then this keyword allows you to specify to which path you send the file. Default is 0.
An object of type SPICE_CREATE_L3_PROGRESS, to display the progress of the creation.
Widget ID of parent widget.
The version number (integer) the level 3 file must have.
The path to the output directory used by the pipeline where L3 file is saved.
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.
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.
If set, fitting won't be computed. This can still be done manually in xcfit_block.
If set, xcfit_block and small window to stopp fitting will not be called.
If set, xcfit_block will not be called, but small window to stopp fitting will appear.
If set, then the line position is NOT represented by the velocity relative to a lab wavelength, but as the wavelength.
If set, then no predefined line list will be used to define gaussian fit components. By default, the list returned by the function spice_line_list() will be used.
IMPORTANT NOTE: For now, this keyword is set by default. One has to set it explicitly to zero if one wants to use the predefined line list. This implementation may change in the future.
Due to instrument temperature variations the wavelength scale changes significantly during the Solar Orbiter orbit, and this variation is not accounted for in L2 files. The wavelength shift is so large that using the line list when fitting fails in many cases.
If set, then the XDIM1 cube will be saved into the FITS file. Default is not to save it. This cube can be recalculated using the WCS parameters given either in HEADER_INPUT_DATA. This keyword can also be an array of zeros and ones, setting/unsetting this feature separately for each window.
If set, then all headers created will be printed to the terminal.
If set, then the FITS file will not be saved. The output is the path and name of the level 3 FITS file, if it would have been saved.
If set, print messages will be suppressed.
Array of ana structure, number of elements is the same as number of windows in the FITS file.
A pointer array, containing the headers of the results extensions as string arrays.