Regions are used to isolate spectral ranges for certain operations. There are three different types of regions:
For creating, modifying or removing regions, an action and an element should be selected in iSpec:
The possibilities with each combination are explained in the following table (it is worth noting that the mouse position in wavelength/flux can be found in the status bar of the editor's window):
Stats | Create | Modify | Remove | |
---|---|---|---|---|
Continuum / Lines / Segments | Left click on a region and its statistical information will be visible in the bottom part of the window. | Left click on an empty space and a new region will appear. If it is a line region, it will ask for an optional note. | Left click and drag modifies the left edge. Right click and drag modifies the right edge. | Left click to remove the region. |
Line marks | - | Left click on a line region to add a note. | Left click on a line region to modify the peak mark. Right click on a line region to add/modify a note. | Left click on a line region to remove the note. |
It is important to remark that Zoom/Pan mode should be disabled in order to be able to execute the above actions. On the other hand, the user is responsible for not creating incoherent overlapping regions like line masks that overlap or segments without line masks.
Regions can be saved and read through the menu "File". Once loaded, they can also be completely removed from the plot through the menu "Operations - Clear - Continuum/Line masks/Segments". In case some regions have been modified and not saved, iSpec will ask for confirmation before clearing them.
iSpec can also be executed from command line indicating directly the regions and spectra to be opened:
./iSpec.command --continuum=input/regions/fe_lines_continuum.txt \
--lines=input/regions/fe_lines.txt \
--segments=input/regions/fe_lines_segments.txt \
input/spectra/examples/NARVAL_Sun_Vesta-1.txt.gz
Continuum region files should be plain text files with tab character as column delimiter. Two columns should exists: 'wave_base' and 'wave_top' (the first line should contain those header names). They indicate the beginning and end of each region (one per line). For instance:
wave_base wave_top
480.6000 480.6100
481.1570 481.1670
491.2240 491.2260
492.5800 492.5990
Additionally, "wave base" should be always lower than "wave top" or iSpec will not be able to process the file.
Line region files should be plain text files with tab character as column delimiter. Four columns should exists: 'wave_peak', 'wave_base', 'wave_top' and 'note' (the first line should contain those header names). They indicate the peak of the line, beginning and end of each region (one per line) and a note (it can be any string comment). For example:
wave_peak wave_base wave_top note
480.8148 480.7970 480.8330 Fe 1
496.2572 496.2400 496.2820 Fe 1
499.2785 499.2610 499.2950
505.8498 505.8348 505.8660 Fe 1
The note can be blank but the previous tab character should exists anyway.
Regarding the wavelenghts, "wave base" should be always lower than "wave top" and "wave peak" should be in between or iSpec will not be able to process the file.
Segment region files should be plain text files with tab character as column delimiter. Two columns should exists: 'wave_base' and 'wave_top' (the first line should contain those header names). They indicate the beginning and end of each region (one per line). For instance:
wave_base wave_top
480.6000 480.6100
481.1570 481.1670
491.2240 491.2260
492.5800 492.5990
The values in the column "wave base" should be always lower than "wave top" or iSpec will not be able to process the file.
It is possible to find continuum regions automatically by analyzing the spectra slice by slice. A spectral range is selected as continuum if the following conditions are met:
Depending on the spectrum type, the slice size and the standard deviation can be adjusted to find better results.
This functionality is located in the "Operations - Find continuum regions" menu and can be applied over the whole spectra or only inside the defined segments. In both cases, it needs a previously fitted continuum. After the computation, it removes the current continuum regions (if there are any) and draws the ones that the process has found.
iSpec can find line regions automatically by selecting "Operations - Find line masks". The search can be done over the whole spectra or only inside the defined segments. In both cases, it needs a previously fitted continuum.
The process follows these steps:
After the computation, it removes the current line regions (if there are any) and draws the ones that the process has found. Note that the cross-match with the atomic data is not always 100% true, since there can be observed absorption lines for which there is no information on the atomic list, or blended lines which the main contributor is not the one it has cross-matched from the atomic line list, etc.
For atmospheric parameters or abundance determination, it is recommended to use a selection of lines that have been shown to work correctly for this kind of task. Not all the lines are good enough to derive parameters. iSpec includes line selections that will be discussed in the section about parameter and abudance determination.
Line masks automatically found or manually defined for a given type of stars may not fit well enough the shape of the line. iSpec can adjust automatically previous defined line masks to match a better beginning/end of the masks to the particular form of the active spectrum. If "check derivatives" is active, the first and second derivatives of the line candidates are checked to try to better delimit where it begins and end (this works better for synthetic spectra or observed spectra with very high signal-to-noise ratios).
To do so, iSpec will check were is the optimal limit of the line by looking at a window of a given margin (in nanometers) around the line center. The algorithm will search for the local maximum in each side of the line that is closer to the line center.
The user that has a group of line masks already defined could be interested in creating segments around them, for instance, in order to compute synthetic spectra or derive atmospheric parameters. iSpec can do that automatically, the user should specify how many nanometers he wants around each line masks and iSpec will group those lines that are close enough under the same segment.