The p3d logo. a general data-reduction tool for fiber-fed integral-field spectrographs
About p3d

Readme

Download

References

Documentation & Tutorials

Links

Screenshots

Authors & Thanks

MUSE cubes

Sourceforge project page

Category: display routine

Summary

PROp3d_display_grat_plot
This routine plots the geometrical orientation of a diffraction grating.
PROp3d_display_imv
Displays raw image data using widgets.
PROp3d_display_lineprofiles
The purpose of this routine is to provide a graphical user interface in order to view the quality of fits of cross-dispersion line profiles (that are used when performing 7optimal extraction and doing cross-talk corrections).
PROp3d_display_sv_event
Handles the widget events of the p3d spectrum viewer.
PROp3d_display_sv_event_bin
Handles zoom events of the p3d spectrum viewer.
PROp3d_display_sv_event_bins_io
This routine loads the content of plain-text bin map files.
PROp3d_display_sv_event_bins_keywords
This routine sets the paper-size related variables and widgets.
PROp3d_display_sv_event_charsize
This routine updates character-size related widgets.
PROp3d_display_sv_event_colors_droplist
This routine updates widgets related to the colors droplist.
PROp3d_display_sv_event_colors_set
This routine updates widgets related to the color range text widgets.
PROp3d_display_sv_event_colortable
This routine sets the color table using the IDL tool xloadct.
PROp3d_display_sv_event_colortable_select
This routine sets up the widgets related to the selected color table.
PROp3d_display_sv_event_debug
This routine updates debug related widgets.
PROp3d_display_sv_event_determine_marked_elements
Calculates which spatial elements are marked.
PROp3d_display_sv_event_errorbars
This routine toggles the error bar widgets.
PROp3d_display_sv_event_find_closest_element
This routine finds the fiber id (and row number) of the spatial element closest to the (device) coordinates [x, y]: .
FUNCTIONp3d_display_sv_event_find_region_index
Finds the region index.
PROp3d_display_sv_event_guide
Shows a guiding image and text in a draw widget to help the user.
PROp3d_display_sv_event_histogram
This routine updates the number-of-threads related widgets.
PROp3d_display_sv_event_invert_fgbg
This routine swaps the foreground and background colors.
PROp3d_display_sv_event_map
This routine activates the selected control panel.
FUNCTIONp3d_display_sv_event_nestr
Formats strings.
PROp3d_display_sv_event_noc
This routine updates "C routine"-related widgets.
PROp3d_display_sv_event_nthreads
This routine updates the number-of-threads related widgets.
PROp3d_display_sv_event_plot
Displays images and draws plots in the p3d spectrum viewer.
PROp3d_display_sv_event_plot_mindex_widgets
Configures all region-related widgets.
PROp3d_display_sv_event_region_statistics
This routine updates the region statistics widgets.
PROp3d_display_sv_event_regions_load
This routine loads the content of a p3d-formatted regions file written with p3d_display_sv_event_regions_save.
PROp3d_display_sv_event_regions_load_ds9
This routine imports the regions content of a ds9-formatted region file.
PROp3d_display_sv_event_regions_save
This routine saves the current regions setup to a p3d-formatted regions file, which can be read using p3d_display_sv_event_regions_load.
PROp3d_display_sv_event_regions_show_ds9
Annotates an active window with DS9 region information.
PROp3d_display_sv_event_remove_fit
Removes the information of a fitted line from the state structure.
PROp3d_display_sv_event_savefilesfit
This routine controls everything related to the spectrum line-fits log file.
PROp3d_display_sv_event_sensfunc_calibration_file
This routine sets up the sensitivity-function calibration data file.
PROp3d_display_sv_event_sensfunc_calibration_save
This routine writes a modified sensitivity-function standard-star calibration file.
PROp3d_display_sv_event_sensfunc_drawwid
This routine handles events of the draw widgets.
PROp3d_display_sv_event_sensfunc_extinction_file
This routine sets up the sensitivity-function extinction data file.
PROp3d_display_sv_event_sensfunc_extinction_select
This routine sets the sensitivity-function extinction-data-origin widgets.
PROp3d_display_sv_event_sensfunc_standardstar_file
This routine sets up the sensitivity-function standard-star data file.
PROp3d_display_sv_event_sensfunc_standardstar_select
This routine sets the sensitivity-function data-origin widgets.
PROp3d_display_sv_event_siview
Controls the spectrum-image viewport setup.
PROp3d_display_sv_event_spatialmap_allregions
This routine sets the widgets related to the shoing of one or multiple regions.
PROp3d_display_sv_event_spatialmap_annotate
This routine updates the widgets associated to the annotated spatial map.
PROp3d_display_sv_event_spatialmap_astroquery
This routine at first calculates an arithmetic average of the x and y positions of the spatial elements in the currently selected region.
PROp3d_display_sv_event_spatialmap_bitmap_size
This routine sets the size of written spatial map bitmap images.
PROp3d_display_sv_event_spatialmap_blinktime
This routine sets the spatial map blink time.
PROp3d_display_sv_event_spatialmap_decinc
This routine selectes either the previous or the next spatial element according to its row or id; widgets are also updated.
PROp3d_display_sv_event_spatialmap_drawwid
This routine handles all events of the spatial map draw widget.
PROp3d_display_sv_event_spatialmap_flipx
This routine sets widgets related to the flipping of the X-axis coordinate.
PROp3d_display_sv_event_spatialmap_mark
This routine "marks" spatial elements, as selected.
PROp3d_display_sv_event_spatialmap_orientation
This routine chnages the orientation of the spatial map.
PROp3d_display_sv_event_spatialmap_papersize
This routine sets the paper-size related variables and widgets.
PROp3d_display_sv_event_spatialmap_pdf_encapsulated
This routine toggles the use of encapsulated output to PDF files.
PROp3d_display_sv_event_spatialmap_polygons
This routine updates the spatial-map polygons related widgets.
PROp3d_display_sv_event_spatialmap_postscript_size
This routine sets the size of written spatial map PostScript files.
PROp3d_display_sv_event_spatialmap_regions_load
This routine initiates loading of region data from one of several files.
PROp3d_display_sv_event_spatialmap_regions_save
This routine initiates saving of region data from one file.
PROp3d_display_sv_event_spatialmap_save
This routine saves the currently chosen spatial maps to a FITS file.
PROp3d_display_sv_event_spatialmap_save_bitmap
This routine initiates saving of the current spatial map to an image file.
PROp3d_display_sv_event_spatialmap_selectid
This routine configures widgets related to the value of the entered spatial element id.
PROp3d_display_sv_event_spatialmap_selectregion
Selects the spatial elements region.
PROp3d_display_sv_event_spatialmap_selectrow
This routine configures widgets related to the value of the entered spatial element row.
PROp3d_display_sv_event_spatialmap_unmark
This routine "unmarks" all spatial elements.
PROp3d_display_sv_event_spatialmap_voronoi_bins
This routine sets up everything related to the Voronoi bins calculations.
PROp3d_display_sv_event_spectrum_addmode
This routine sets the spectrum use mode.
PROp3d_display_sv_event_spectrum_drawwid
This routine fills the draw widget of the spectrum.
PROp3d_display_sv_event_spectrum_emissionline_dialog
Provides a GUI to select an emission line.
PROp3d_display_sv_event_spectrum_emissionline_file
This routine stores the emission lines file in the state structure and sets up the related widgets.
PROp3d_display_sv_event_spectrum_emissionline_read
Reads the contents of a plain-text file with emission-line entries.
PROp3d_display_sv_event_spectrum_emissionline_redshift
This routine calculates a redshift for the selected emission line.
PROp3d_display_sv_event_spectrum_emissionline_show
This routine does two operations on emission lines: o Toggles showing them in the spectrum plot.
PROp3d_display_sv_event_spectrum_redshift_system
This routine sets the system redshift.
PROp3d_display_sv_event_spectrum_save
This routine saves the currently viewed spectrum to a FITS file or a text file.
PROp3d_display_sv_event_spectrum_show
This routine updates the spectrum show widgets.
PROp3d_display_sv_event_spectrum_wavelength_range
This routine sets the widgets related to the spectrum wavlength range.
PROp3d_display_sv_event_spectrum_waverange_reset
This routine resets the abscissa range in the spectrum plot.
PROp3d_display_sv_event_spectrum_waverange_shift
Handles wavelength range shift events of the p3d spectrum viewer.
PROp3d_display_sv_event_spectrum_waverange_shiftval
This routine .
PROp3d_display_sv_event_spectrum_waverange_zoom
Handles wavelength range zoom events of the p3d spectrum viewer.
PROp3d_display_sv_event_spectrum_waveunit
This routine sets up the spectrum plot abscissa unit.
PROp3d_display_sv_event_spectrum_weighted_mean
This routine updates the spectrum weighted mean widgets.
PROp3d_display_sv_event_spectrum_yrange_droplist
This routine sets the spectrum y-range related widgets when using the menu bar or the droplist.
PROp3d_display_sv_event_spectrum_yrange_set
This routine sets the spectrum y-range-related widgets.
PROp3d_display_sv_event_spectrum_zoomfac
This routine sets the zoom factor widgets.
PROp3d_display_sv_event_spectrumimage_drawwid
This routine fills the draw widget of the spectrum image.
PROp3d_display_sv_event_spectrumimage_mfactor
This routine selects the viewed spectrum image multiplication factor.
PROp3d_display_sv_event_spectrumimage_select
This routine selects the viewed spectrum image.
PROp3d_display_sv_event_spectrumimage_wavelength_bandwidth
This routine sets the spectrum image bandwidth used when calculating the spatial map.
PROp3d_display_sv_event_spectrumimage_wavelength_bin
This routine sets the wavelength bin and related widgets.
PROp3d_display_sv_event_spectrumimage_whitelight
This routine sets the widgets related to the use of the white-light functionality.
PROp3d_display_sv_event_spview
Moves the active-widget identifier '*' from one widget and adds it to another.
PROp3d_display_sv_event_sum_up_bins
Sums up image elements to create a binned spatial map image.
PROp3d_display_sv_event_sum_up_map
Sums up wavelength bins to create a spatial map image.
PROp3d_display_sv_event_sum_up_spectrum
Co-adds all marked spectra.
PROp3d_display_sv_event_tab
This routine activates the selected tab.
PROp3d_display_sv_event_targetsetup
This routine updates the target-related widgets: .
PROp3d_display_sv_event_telescl_postable
This display tool shows a spatial map of all elements of an IFU.
PROp3d_display_sv_event_tvimage
Sets up the spectrum image array in p3d_sv.
PROp3d_display_sv_event_verbose
This routine updates verbosity related widgets.
PROp3d_display_sv_event_wcs_update
Updates the World Coordinate System information used by p3d.
PROp3d_display_sv_read_parameters
Reads instrument parameters for the spectrum viewer.
PROp3d_display_sv_sensfunc_plot
Draws sensitivity-function related plots in the p3d spectrum viewer.
PROp3d_display_tele
This routine is a replacement for TV that can also enlarge the image and assign the data a color table.
PROp3d_fastview_event
Handles the widget events of p3d fastview.
PROp3d_misc_state_load
This routine loads a saved session setup from a plain-text file.
PROp3d_misc_state_save
This routine saves the GUI setup of the spectrum viewer or the automatic reduction tool to a plain-text file.
FUNCTIONp3d_sv_cw_regstat
Creates a compound widget to show region statistics information.

Copyright

p3d: a general data-reduction tool for fiber-fed IFSs

Copyright 2009-2011, 2014, 2015 Leibniz Institute for Astrophysics Potsdam (AIP)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses>.

Additional permission under GNU GPL version 3 section 7

If you modify this Program, or any covered work, by linking or combining it with IDL (or a modified version of that library), containing parts covered by the terms of the IDL license, the licensors of this Program grant you additional permission to convey the resulting work.

Routine Documentation

routines/p3d_display_grat_plot.pro, line 113, last changed at 2015-10-19 by christersandin (revision 3628)

p3d_display_grat_plot, eta, alpha, blaze, forward=, ll=, ur=, lr=, ul=, topwid=, verbose=, error=, /debug, /help

This routine plots the geometrical orientation of a diffraction grating.

Input parameters:
etaA decimal value specifying the collimator/camera angle [°].
alphaA decimal value specifying the angle (grating normal, camera axis) [°].
blazeA decimal value specifying the grating blaze angle [°].
Keyword parameters:
forward"forward" diffraction, m=+1.
urA string specifying the text in the upper right corner.
lrA string specifying the text in the lower right corner.
llA string specifying the text in the lower left corner.
ulA string specifying the text in the upper left corner.
topwidIf set, then error messages are displayed using DIALOG_MESSAGE, using this widget id as DIALOG_PARENT, instead of MESSAGE.
verboseSet this parameter to a positive scalar integer to make p3d write some information on STDOUT about what is going on. The following four values are acknowledged:

0

Writes no information at all. This is the default.

1

Writes the more important information; regarding subroutine configurations, mostly.

2

Writes most information; includes a more verbose output than 1.

3

Writes all information, including information on the execution state of GUI subroutines. This may be a useful mode when debugging the code.

errorThis scalar integer returns an error code if set. Any value different from zero means that an error has occurred.
debugNo error handler is setup if this keyword is set. The default is otherwise to setup an error handler (using the routine CATCH), which makes each subroutine exit quietly in case a bug is encountered. Use this keyword when debugging p3d.
helpSet this keyword to show this routine documentation, and then exit.
Examples:

p3d_display_grat_plot, 42.0, 12.4, 5.8, [/FORWARD]

routines/p3d_display_imv.pro, line 648, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_imv, filename, colmin, colmax, trcpfx=, rawpfx=, rawpath=, imagepath=, title=, bottom=, xsize=, ysize=, xscrsize=, yscrsize=, group_leader=, logunit=, verbose=, font=, error=, /debug, /help

Displays raw image data using widgets.

Optionally, if the image data header contains the keyword RAWPFX then the file pointed at by that keyword is loaded and shown as raw data.

Also optionally, if the image contains the keyword TRCPFX then the file pointed at by that keyword is used as a trace mask to overlay the raw data file (RAWPFX). In this case the original image is not used.

Input parameters:
filenameThe filename of the data to view. This must be a fits-file. If a trace data file is specified in this file, using the fits header keyword TRCPFX (see below) then this data are not used, but the raw data are (RAWPFX).
colminThe lower cut for colors. The default value is: min(array)
colmaxThe upper cut for colors. The default value is: max(array)
Keyword parameters:
trcpfxThis is the header keyword that is used in FILENAME to mark the trace mask filename, if that has been used. If the tracemask file is found then the data in filename is not used. Instead the raw data (RAWPFX) is used. The raw data will be shown in the first tab and the raw data with an overlayed trace mask in the next tab. The default value is: 'IMTRC'
rawpfxThis is the header keyword that is used in FILENAME to mark the raw data filename, if that has been used. If it has been used then the raw data are loaded in a separate tab, along with the resulting data in the next tab. If the file using the first prefix is not found then the second prefix is used to find a raw file, along with the keyword RAWPATH. In this case the file marked by RAWPFX must not contain the path. The default value is: 'IMRAW', 'IMCMB000'
rawpathThis header keyword gives the raw data path in case the second prefix of RAWPFX is used (see above). The default value is: 'IMPATH'
imagepathA scalar string that, if set, is used as a path for the trace mask and raw data images (instead of whatever path is found in the header of FILENAME.
titleA string that is used in the title of the base widget. The default value is: 'Image Display'
bottomThe lower index used in the color table. The default value is: 0
xsizeX-size of the displayed image
ysizeY-size of the displayed image
xscrsizeDefines the x-size of the draw widget. The default value is: min(1400, xsize)
yscrsizeDefines the y-size of the draw widget. The default value is: min(800, ysize)
group_leaderIf set, then error messages are displayed using DIALOG_MESSAGE, using this widget id as DIALOG_PARENT, instead of MESSAGE.
logunitMessages are saved to the file pointed to by this logical file unit, if it is defined.
verboseSet this parameter to a positive scalar integer to make p3d write some information on STDOUT about what is going on. The following four values are acknowledged:

0

Writes no information at all. This is the default.

1

Writes the more important information; regarding subroutine configurations, mostly.

2

Writes most information; includes a more verbose output than 1.

3

Writes all information, including information on the execution state of GUI subroutines. This may be a useful mode when debugging the code.

fontSet this scalar string to the name of the font you want to use with all the widget components of this tool.
errorThis scalar integer returns an error code if set. Any value different from zero means that an error has occurred.
debugNo error handler is setup if this keyword is set. The default is otherwise to setup an error handler (using the routine CATCH), which makes each subroutine exit quietly in case a bug is encountered. Use this keyword when debugging p3d.
helpSet this keyword to show this routine documentation, and then exit.

routines/p3d_display_lineprofiles.pro, line 901, last changed at 2019-12-08 by christersandin (revision 5316)

p3d_display_lineprofiles, rawarray, traces, lprofs, rawdarray=, trcp1=, trcp2=, deadpos=, title=, filename=, proffun=, optex=, /cinv, /a2, /a3, /a5, /letter, /legal, /tabloid, psnumwave=, /postscriptonly, postscriptfile=, /compress, /blockgui, topwid=, logunit=, verbose=, font=, error=, /debug, /help

The purpose of this routine is to provide a graphical user interface in order to view the quality of fits of cross-dispersion line profiles (that are used when performing 7optimal extraction and doing cross-talk corrections).

Several input images are used to show the fits. At first the raw data (RAWARRAY; and optionally its variance RAWDARRAY) is drawn for a selected wavelength bin on the cross-dispersion axis (2nd dimension of the images). Thereafter the locations of the spectra are drawn using the trace mask (TRACES; including a spectrum integer identifier). Finally the line profiles (LPROFS) are drawn on top of the other lines.

The viewer starts up with showing a cross-dispersion cut for the central wavelength bin. The positions of the spectra are indicated with a vertical line and an identifier above every spectrum position. In order to select another wavelength bin you can either enter the bin number (1-based) in the text widget below the draw area to the left. Or you can drag the widget slider to show the bin of interest.

Error bars of the raw data are shown by pressing the button 'Show errors' in the lower left part of the control panel under the draw area. When this button is pressed it changes name to 'Hide errors', press it to then remove the error bars. The y-range is set automatically to use the maximum range in the shown x-range. The character size can be changed by selecting another value in the droplist, that says '1.0' when the viewer starts. Press the button 'Auto Y-Range -Y-' to always use the maximum across the full x-range. Press the same button to again activate automatic y-ranging.

The x-range can be shifted by clicking the left and right arrow buttons next to the 'shift' label, or by first clicking in the draw area and then pressing the left and right arrow keys. The shift value can be changed by entering a new value in the text widget between the arrow keys, or by pressing Ctrl-left arrow or Ctrl-right arrow.

You can zoom into the plot, or out from it, by pressing the up and down arrows right of the 'zoom:' label, respectively. You can also first click in the draw area and then press the up and down arrow keys. In order to change the zoom factor, enter a new value (percentage of current range) in the text widget between the arrow buttons, or press Ctrl-up arrow or Ctrl-down arrow.

If the special keywords TRCP1 and TRCP2, and optionally DEADPOS, are set, then the tool is setup in a special mode to view how well spectra have been found. For one wavelength bin, the data are plotted in the cross-dispersion direction. The location of the initially identified spectra are shown with a downwards pointing triangle. The identified spectra, which were also found to be separated by the right distance are shown with an 'X'-sign. The location of spectra, which match the pre-defined mask mask REFMASK, are shown with a '*'-symbol. Finally, if dead (or unused) fiber positions are specified, then these corresponding spectra are indicated in dark green. For further details, see p3d_tracing_findspec.pro

Input parameters:
rawarrayA two-dimensional array of decimal type that contains the raw image used when fitting the cross- dispersion line profiles. It is expected that the dispersion axis is in the first dimension of RAWARRAY (as well as TRACES and RAWDARRAY).
tracesA two-dimensional array of decimal type that contains the (starting) centroids of every spectrum at every bin. This array is used to plot the positions (and number identifier) of every spectrum.
lprofsA five-dimensional array of decimal type that contains the fitted line profile. The array dimensions 1 and 2 of LPROFS must agree with those of TRACES. LPROFS is only used if OPTEX is not set.
Keyword parameters:
rawdarrayA two-dimensional array of decimal type that contains the variance of RAWARRAY. The dimensions of RAWDARRAY must be the same as those of RAWARRAY.
trcp1A one-dimensional array of decimal type that contains the fiber positions of spectra that were identified in the first step of the tracing.
trcp2A one-dimensional array of decimal type that contains the fiber positions of spectra that were identified in the second step of the tracing.
deadposA one-dimensional array of decimal type that contains the fiber positions of dead or unused spectra. These are shown with a dark green color in the plot.
titleA scalar string that is used in the viewer title. Note that FILENAME must be set if TITLE is not set. The default value is: 'p3d: Cross-dispersion line profiles viewer: "'+FILENAME+'"'
filenameA scalar string with the name of the file of RAWARRAY. FILENAME is only used if TITLE is not used, and then in order to create a title.
proffunA scalar string with the name of the function to use when (re-)calculating the line profile.
optexA two-dimensional array of decimal type that contains a secondary profile of every wavelength bin and spectrum. This variable can be used to check if the optimal extraction went OK. This profile is plotted on top of the raw data. If OPTEX is provided then LPROFS is not used.
cinvSet this keyword to plot white lines on a black background instead of the default, which is to plot black lines on a white background.
a2Set this keyword to use the A2 paper format with the PostScript output instead of A4.
a3Set this keyword to use the A3 paper format with the PostScript output instead of A4.
a5Set this keyword to use the A5 paper format with the PostScript output instead of A4.
letterSet this keyword to use the US Letter paper format with the PostScript output instead of A4.
legalSet this keyword to use the US Legal paper format with the PostScript output instead of A4.
tabloidSet this keyword to use the US Tabloid paper format with the PostScript output instead of A4.
psnumwaveSet this value to a scalar integer >=1 and <=201. It defines the number of wavelengths (pages) where the line profiles are plotted. The default number is 5. The default value is: 5
postscriptonlySet this keyword to only plot to a postscript file, thus never opening the widget inspection tool.
postscriptfileA scalar string with the name of the postscript file that is created in this routine. The default value is: 'p3d.ps'
compressIf this keyword is set, then an attempt is made to compress the output postscript file using bzip2. The default value is: 1
blockguiThe created GUI is blocked if this keyword is set.
topwidIf set, then error messages are displayed using DIALOG_MESSAGE, using this widget id as DIALOG_PARENT, instead of MESSAGE.
logunitMessages are saved to the file pointed to by this logical file unit, if it is defined.
verboseSet this parameter to a positive scalar integer to make p3d write some information on STDOUT about what is going on. The following four values are acknowledged:

0

Writes no information at all. This is the default.

1

Writes the more important information; regarding subroutine configurations, mostly.

2

Writes most information; includes a more verbose output than 1.

3

Writes all information, including information on the execution state of GUI subroutines. This may be a useful mode when debugging the code.

fontSet this scalar string to the name of the font you want to use with all the widget components of this tool.
errorThis scalar integer returns an error code if set. Any value different from zero means that an error has occurred.
debugNo error handler is setup if this keyword is set. The default is otherwise to setup an error handler (using the routine CATCH), which makes each subroutine exit quietly in case a bug is encountered. Use this keyword when debugging p3d.
helpSet this keyword to show this routine documentation, and then exit.

routines/p3d_display_sv_event.pro, line 158, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_display_sv_event, event

Handles the widget events of the p3d spectrum viewer.

Input parameters:
eventThe event structure of p3d_sv.

routines/p3d_display_sv_event_bin.pro, line 69, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_bin, index, dx, dy, state=

Handles zoom events of the p3d spectrum viewer.

Input parameters:
indexA scalar integer indicating which scale to use.
dxA scalar integer specifying the zoom x center.
dyA scalar integer specifying the zoom y center.
stateThe p3d state structure.

routines/p3d_display_sv_event_bins_io.pro, line 61, last changed at 2020-08-27 by christersandin (revision 5463)

p3d_display_sv_event_bins_io, state, /save, topwid=, error=

This routine loads the content of plain-text bin map files.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_bins_keywords.pro, line 64, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_bins_keywords, index, event_id, state, error=

This routine sets the paper-size related variables and widgets.

Input parameters:
indexA scalar integer that specifies the originating widget.
event_idA scalar integer with the id of the calling widget.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_charsize.pro, line 62, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_charsize, event_index, state, error=

This routine updates character-size related widgets.

Input parameters:
event_indexThe index of the selected entry in the droplist.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_colors_droplist.pro, line 64, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_display_sv_event_colors_droplist, index, state, error=

This routine updates widgets related to the colors droplist.

Input parameters:
indexA scalar integer that specifies the originating widget.
eventThe event structure.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_colors_set.pro, line 61, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_colors_set, state, error=

This routine updates widgets related to the color range text widgets.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_colortable.pro, line 97, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_colortable, index, state, error=

This routine sets the color table using the IDL tool xloadct.

Input parameters:
indexA scalar integer with the ID of the used color table.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_colortable_select.pro, line 63, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_display_sv_event_colortable_select, index, state, error=

This routine sets up the widgets related to the selected color table.

Input parameters:
indexA scalar integer with the ID of the used color table.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_debug.pro, line 63, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_display_sv_event_debug, index, debug_var, state, error=

This routine updates debug related widgets.

Input parameters:
indexA scalar integer with the widget index.
debug_var
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_determine_marked_elements.pro, line 68, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_determine_marked_elements, state, idgrab, mask, poss=, j=, ishft=, some_done=, posmarked_use=, fraction=, getid=, xsize=, ysize=, concat=, error=

Calculates which spatial elements are marked.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_errorbars.pro, line 61, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_errorbars, state, error=

This routine toggles the error bar widgets.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_find_closest_element.pro, line 69, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_find_closest_element, x, y, xsize, ysize, id, rownum, fiberpos=, orientation=, pos=, mask=, /polygons, /cube, winpos=, viewport=

This routine finds the fiber id (and row number) of the spatial element closest to the (device) coordinates [x, y]:

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_find_region_index.pro, line 61, last changed at 2016-04-05 by christersandin (revision 4061)

p3d_display_sv_event_find_region_index, arr

Finds the region index.

Input parameters:
arrThe .

routines/p3d_display_sv_event_guide.pro, line 76, last changed at 2016-03-03 by christersandin (revision 4020)

p3d_display_sv_event_guide, state, uval, event, text, wid, mode=, error=

Shows a guiding image and text in a draw widget to help the user.

The guide images were taken from the following image: http://www.freecadweb.org/wiki/images/9/92/Mouse-model.png

The original image is licensed under the Creative Commons Attribution where the license reads: http://creativecommons.org/licenses/by/3.0/legalcode

The image was cropped, scaled, and flipped to form the following images used here (the files are placed in p3d_path/resources/): Mouse-model_left-button.png, Mouse-model_right-button.png, Mouse-model_scroll-wheel.png.

Input parameters:
stateThe p3d_sv event structure.

routines/p3d_display_sv_event_histogram.pro, line 61, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_histogram, state, error=

This routine updates the number-of-threads related widgets.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_invert_fgbg.pro, line 61, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_invert_fgbg, state, error=

This routine swaps the foreground and background colors.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_map.pro, line 64, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_map, state, event_index, error=

This routine activates the selected control panel.

Input parameters:
stateThe state structure of p3d_sv.
Optional parameters:
event_indexThe index of the selected entry in the dropplist.

routines/p3d_display_sv_event_nestr.pro, line 61, last changed at 2016-04-29 by christersandin (revision 4150)

p3d_display_sv_event_nestr,

Formats strings.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_noc.pro, line 61, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_display_sv_event_noc, state, error=

This routine updates "C routine"-related widgets.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_nthreads.pro, line 62, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_display_sv_event_nthreads, index, state, error=

This routine updates the number-of-threads related widgets.

Input parameters:
indexA scalar integer with the widget index.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_plot.pro, line 172, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_display_sv_event_plot, state, x, xvar=, xobandw=, specnum=, /colorbar, /imagebar, /imageplot, /imagebands, /imagesmap, /imagerowspatmap, oldelement=, imagesingleelement=, singleelement=, /noerase, grab=, idgrab=, /specan, /specplot, arrow=, /whitelight, filename=, /regionstats, /cmyk, /pdf, /encapsulatedpdf, binpdf=

Displays images and draws plots in the p3d spectrum viewer.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_plot_mindex_widgets.pro, line 61, last changed at 2016-04-05 by christersandin (revision 4063)

p3d_display_sv_event_plot_mindex_widgets, state, mindex, maxval, rb=

Configures all region-related widgets.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_region_statistics.pro, line 61, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_region_statistics, state, error=

This routine updates the region statistics widgets.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_regions_load.pro, line 71, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_regions_load, state, filename, topwid=, error=

This routine loads the content of a p3d-formatted regions file written with p3d_display_sv_event_regions_save.

Regions files written with DS9 are read using the routine p3d_display_sv_event_regions_load_ds9.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_regions_load_ds9.pro, line 515, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_regions_load_ds9, state, filename, topwid=, error=

This routine imports the regions content of a ds9-formatted region file. Specifically, the following regions are recognized (all other regions are ignored):

text : The required values are the right ascension and the declination as well as the text. For example, 'text(00:54:31.63,-37:39:04.25) text={Lya}'

circle : The required values are the right ascension, the declination, and the radius of the circle. For example, 'circle(00:54:31.63,-37:39:04.25,2.5")'

annulus : The required values are the right ascension, the declination, and the inner and outer radii of the circle. For example, 'annulus(00:54:31.63,-37:39:04.25,2.5",3.5")'

ellipse : The required values are the right ascension, the declination, the major axis radius, the minor axis radius, and the angle. For example, 'ellipse(0:54:51.998,-37:40:36.04,1",0.8",0) # text={2}'

The annulus type is also supported, where an outer ellipse is specified after an ampersand and an exclamation mark. For example (all on one line): 'ellipse(0:54:51.998,-37:40:36.04,1",0.8",0) & ... !ellipse(0:54:51.998,-37:40:36.04,2",1.6",0) # text={2}'

box : The required values are the right ascension, the declination, the x size of the rectangle, the y size of the rectangle, and the angle. For example, 'box(00:55:13.6,-37:41:32.0,2.5",2.5",0.0) # text={Vega}'

The annulus type is also supported, where an outer box is specified after an ampersand and an exclamation mark. For example (all on one line): 'box(00:55:13.6,-37:41:32.0,2.5",2.5",0.0) & ... !box(00:55:13.6,-37:41:32.0,3.5",3.5",0.0) # text={Vega}'

polygon : The required format is a set of right ascension and declination coordinate pairs. For example, 'polygon(0:54:53.430,-37:40:59.54,0:54:53.459,-37:40:58.64, 0:54:53.449,-37:40:58.69,0:54:53.477,-37:40:57.52, 0:54:53.475,-37:40:56.15,0:54:53.458,-37:40:55.57, 0:54:53.363,-37:40:57.34,0:54:53.284,-37:40:58.54, 0:54:53.196,-37:40:59.42,0:54:53.131,-37:41:00.09, 0:54:53.055,-37:41:00.94,0:54:52.992,-37:41:01.59, 0:54:52.975,-37:41:02.07,0:54:53.009,-37:41:02.14, 0:54:53.055,-37:41:02.07,0:54:53.089,-37:41:02.52, 0:54:53.034,-37:41:03.19,0:54:52.950,-37:41:03.89, 0:54:52.886,-37:41:04.61,0:54:52.849,-37:41:05.40, 0:54:52.899,-37:41:05.69,0:54:52.958,-37:41:05.59, 0:54:53.038,-37:41:04.99,0:54:53.152,-37:41:04.09, 0:54:53.207,-37:41:03.19,0:54:53.253,-37:41:02.59, 0:54:53.316,-37:41:01.79,0:54:53.396,-37:41:00.54)

The recognized and parsed local properties for each region are:

text : A region-specific text string. width : The line width (px) used when drawing the region in ds9. color : The name of the color used to show the region in ds9. textangle : The angle of text; the default value is 0.

Files compressed using gzip are recognized if the filename ends with the suffix '.gz'.

Links

ds9: http://ds9.si.edu

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_regions_save.pro, line 73, last changed at 2020-08-27 by christersandin (revision 5463)

p3d_display_sv_event_regions_save, state, filename, /spx, topwid=, error=

This routine saves the current regions setup to a p3d-formatted regions file, which can be read using p3d_display_sv_event_regions_load.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_regions_show_ds9.pro, line 67, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_regions_show_ds9, state, topwid=, error=

Annotates an active window with DS9 region information.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_remove_fit.pro, line 66, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_remove_fit, state

Removes the information of a fitted line from the state structure.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_savefilesfit.pro, line 64, last changed at 2020-08-27 by christersandin (revision 5463)

p3d_display_sv_event_savefilesfit, index, state, error=

This routine controls everything related to the spectrum line-fits log file.

Input parameters:
indexA scalar integer that specifies the originating widget.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_sensfunc_calibration_file.pro, line 63, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_sensfunc_calibration_file, index, state, error=

This routine sets up the sensitivity-function calibration data file.

Input parameters:
indexA scalar integer that specifies the originating widget.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_sensfunc_calibration_save.pro, line 62, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_sensfunc_calibration_save, state, error=

This routine writes a modified sensitivity-function standard-star calibration file.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_sensfunc_drawwid.pro, line 66, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_sensfunc_drawwid, index, event, event_origin, state, error=

This routine handles events of the draw widgets.

Input parameters:
indexA scalar integer that specifies the originating widget.
eventThe event structure.
event_originA string with the event structure name.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_sensfunc_extinction_file.pro, line 63, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_sensfunc_extinction_file, index, state, error=

This routine sets up the sensitivity-function extinction data file.

Input parameters:
indexA scalar integer that specifies the originating widget.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_sensfunc_extinction_select.pro, line 62, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_sensfunc_extinction_select, state, error=

This routine sets the sensitivity-function extinction-data-origin widgets.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_sensfunc_standardstar_file.pro, line 64, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_sensfunc_standardstar_file, index, state, error=

This routine sets up the sensitivity-function standard-star data file.

Input parameters:
indexA scalar integer that specifies the originating widget.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_sensfunc_standardstar_select.pro, line 61, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_sensfunc_standardstar_select, state, error=

This routine sets the sensitivity-function data-origin widgets.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_siview.pro, line 68, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_siview, index, event, state=, error=

Controls the spectrum-image viewport setup.

Input parameters:
indexA scalar integer indicating what to do.
eventThe event structure.
stateThe p3d state structure.

routines/p3d_display_sv_event_spatialmap_allregions.pro, line 66, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_allregions, in_index, event_id, event_origin, state, error=

This routine sets the widgets related to the shoing of one or multiple regions.

Input parameters:
in_indexA scalar integer with the widget index.
eventThe event structure.
event_originA scalar string with the type of the widget.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_annotate.pro, line 62, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_annotate, state, error=

This routine updates the widgets associated to the annotated spatial map.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_astroquery.pro, line 77, last changed at 2018-05-02 by christersandin (revision 4903)

p3d_display_sv_event_spatialmap_astroquery, state, error=

This routine at first calculates an arithmetic average of the x and y positions of the spatial elements in the currently selected region. Thereafter, the x and y coordinates are converted to a RA, DEC coordinate pair that is used to query the SIMBAD astroquery Python package for the names of objects surrounding the coordinates.

Finally, the resulting string array is copied to the list widget in the target selection box.

Links

Read about the astropy package astroquery here: http://astroquery.readthedocs.io/en/latest/index.html

SIMBAD Astronomival Database – CDS (Strasbourg): http://simbad.u-strasbg.fr/simbad/

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_bitmap_size.pro, line 63, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_bitmap_size, value, index, state, error=

This routine sets the size of written spatial map bitmap images.

Input parameters:
valueThe widget value.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_blinktime.pro, line 62, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_blinktime, value, state, error=

This routine sets the spatial map blink time.

Input parameters:
valueThe widget value.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_decinc.pro, line 63, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_decinc, index, state, error=

This routine selectes either the previous or the next spatial element according to its row or id; widgets are also updated.

Input parameters:
indexA scalar integer with the widget index.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_drawwid.pro, line 64, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_drawwid, event, event_origin, state, error=

This routine handles all events of the spatial map draw widget.

Input parameters:
eventThe event structure.
event_originA scalar string with the calling widget type.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_flipx.pro, line 62, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_flipx, state, error=

This routine sets widgets related to the flipping of the X-axis coordinate.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_mark.pro, line 66, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spatialmap_mark, index, event, event_origin, state, error=

This routine "marks" spatial elements, as selected.

Input parameters:
indexA scalar integer that specifies the originating widget.
eventThe event structure.
event_originA scalar string with the widget type.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_orientation.pro, line 62, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_orientation, index, state, error=

This routine chnages the orientation of the spatial map.

Input parameters:
indexA scalar integer that specifies the orientation.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_papersize.pro, line 63, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_papersize, index, state, error=

This routine sets the paper-size related variables and widgets.

Input parameters:
indexA scalar integer that specifies the originating widget.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_pdf_encapsulated.pro, line 61, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_pdf_encapsulated, state, error=

This routine toggles the use of encapsulated output to PDF files.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_polygons.pro, line 61, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_polygons, state, error=

This routine updates the spatial-map polygons related widgets.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_postscript_size.pro, line 64, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_postscript_size, value, index, state, error=

This routine sets the size of written spatial map PostScript files.

Input parameters:
valueThe widget value.
indexThe widget index value.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_regions_load.pro, line 62, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spatialmap_regions_load, state, error=

This routine initiates loading of region data from one of several files.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_regions_save.pro, line 61, last changed at 2020-08-27 by christersandin (revision 5463)

p3d_display_sv_event_spatialmap_regions_save, state, error=

This routine initiates saving of region data from one file.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_save.pro, line 61, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_save, state, error=

This routine saves the currently chosen spatial maps to a FITS file.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_save_bitmap.pro, line 62, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_display_sv_event_spatialmap_save_bitmap, state, topwid=, error=

This routine initiates saving of the current spatial map to an image file.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spatialmap_selectid.pro, line 66, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_selectid, in_value, state, plotit, error=

This routine configures widgets related to the value of the entered spatial element id.

Input parameters:
in_valueThe value is a scalar decimal value.
stateThe state structure of p3d_sv.
plotitA scalar integer that indicates if the spatial map should be redrawn.

routines/p3d_display_sv_event_spatialmap_selectregion.pro, line 65, last changed at 2021-06-23 by christersandin (revision 5490)

p3d_display_sv_event_spatialmap_selectregion, state, event, index=, error=

Selects the spatial elements region.

Input parameters:
stateThe p3d state structure.

routines/p3d_display_sv_event_spatialmap_selectrow.pro, line 66, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spatialmap_selectrow, in_value, state, plotit, error=

This routine configures widgets related to the value of the entered spatial element row.

Input parameters:
in_valueThe value is a scalar decimal value.
stateThe state structure of p3d_sv.
plotitA scalar integer that indicates if the spatial map should be redrawn.

routines/p3d_display_sv_event_spatialmap_unmark.pro, line 65, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spatialmap_unmark, state, done=, error=

This routine "unmarks" all spatial elements.

Input parameters:
stateThe state structure of p3d_sv.
Output parameters:
doneA scalar integer that indicates if all elements were in fact unmarked.

routines/p3d_display_sv_event_spatialmap_voronoi_bins.pro, line 66, last changed at 2020-08-27 by christersandin (revision 5463)

p3d_display_sv_event_spatialmap_voronoi_bins, index, event, state, error=

This routine sets up everything related to the Voronoi bins calculations.

Input parameters:
indexScalar integer, which indicates which widget is used.
eventThe event structure.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_addmode.pro, line 152, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_displaye_sv_event_spectrum_addmode, index, state, stateload=, error=

This routine sets the spectrum use mode.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_drawwid.pro, line 64, last changed at 2021-06-23 by christersandin (revision 5489)

p3d_display_sv_event_spectrum_drawwid, event, event_origin, state, error=

This routine fills the draw widget of the spectrum.

Input parameters:
eventThe event structure.
event_originA scalar string with the widget type.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_emissionline_dialog.pro, line 118, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_emissionline_dialog, state

Provides a GUI to select an emission line.

Input parameters:
stateThe state structure of p3d_sv.
Side effects:

The GUI creates an event when it is closed, which is caught by the p3d main GUI event handler.

routines/p3d_display_sv_event_spectrum_emissionline_file.pro, line 64, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_emissionline_file, filename, get_path, state, error=

This routine stores the emission lines file in the state structure and sets up the related widgets.

Input parameters:
filenameA scalar string with the filename to use.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_emissionline_read.pro, line 63, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spectrum_emissionline_read, state

Reads the contents of a plain-text file with emission-line entries.

Input parameters:
stateThe state structure of p3d_sv.
Side effects:

The GUI creates an event when it is closed, which is caught by the p3d main GUI event handler.

routines/p3d_display_sv_event_spectrum_emissionline_redshift.pro, line 65, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_emissionline_redshift, index, event, state, error=

This routine calculates a redshift for the selected emission line.

Input parameters:
indexA scalar integer that specifies the originating wisget.
eventThe event structure.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_emissionline_show.pro, line 64, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_emissionline_show, index, state, error=

This routine does two operations on emission lines:

  • Toggles showing them in the spectrum plot.

  • Shows a popup window with all entries in the emission line list.

Input parameters:
indexA scalar integer that specifies what to do.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_redshift_system.pro, line 65, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_redshift_system, index, event, state, error=

This routine sets the system redshift.

Input parameters:
indexA scalar integer that specifies the originating wisget.
eventThe event structure.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_save.pro, line 285, last changed at 2020-08-27 by christersandin (revision 5463)

p3d_display_sv_event_spectrum_save, index, state, revision=, tool=, error=

This routine saves the currently viewed spectrum to a FITS file or a text file. Or, all spectra are exported to plain-text ASCII files if index == 2.

Input parameters:
indexA scalar integer that specifies the originating widget.
stateThe state structure of p3d_sv.
Keyword parameters:
revisionA scalar integer with the revision of TOOL.
toolA scalar string with the name of the tool, whose name is added to the output text file.

routines/p3d_display_sv_event_spectrum_show.pro, line 61, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_show, state, error=

This routine updates the spectrum show widgets.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_wavelength_range.pro, line 66, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_wavelength_range, value, index, state, oxvar=, /stateload, error=

This routine sets the widgets related to the spectrum wavlength range.

Input parameters:
valueThe value to use.
indexA scalar integer that specifies the originating widget.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_waverange_reset.pro, line 61, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_waverange_reset, state, error=

This routine resets the abscissa range in the spectrum plot.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_waverange_shift.pro, line 68, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_waverange_shift, index, state, error=

Handles wavelength range shift events of the p3d spectrum viewer.

Input parameters:
indexA keyword indicating if the shift is negative or positive.
stateThe p3d state structure.

routines/p3d_display_sv_event_spectrum_waverange_shiftval.pro, line 64, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_waverange_shiftval, event, state, /stateload, error=

This routine

Input parameters:
eventThe event structure.
stateThe state structure of p3d_sv.
stateloadConfigures the related widgets when set.

routines/p3d_display_sv_event_spectrum_waverange_zoom.pro, line 69, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_waverange_zoom, index, state, nwave=, error=

Handles wavelength range zoom events of the p3d spectrum viewer.

Input parameters:
indexA keyword indicating if the shift is negative or positive.
stateThe p3d state structure.

routines/p3d_display_sv_event_spectrum_waveunit.pro, line 63, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_waveunit, index, state, error=

This routine sets up the spectrum plot abscissa unit.

Input parameters:
indexA scalar integer that specifies the originating widget.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_weighted_mean.pro, line 61, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_weighted_mean, state, error=

This routine updates the spectrum weighted mean widgets.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_yrange_droplist.pro, line 62, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_yrange_droplist, state, error=

This routine sets the spectrum y-range related widgets when using the menu bar or the droplist.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_yrange_set.pro, line 67, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_yrange_set, value, index, change, state, error=

This routine sets the spectrum y-range-related widgets.

Input parameters:
valueA scalar decimal value.
indexA scalar integer that indicates the affected widget.
changeA scalar integer that indicates if the range was changed.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrum_zoomfac.pro, line 62, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_spectrum_zoomfac, notok, state, error=

This routine sets the zoom factor widgets.

Input parameters:
notokA scalar integer specifying the action to take.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrumimage_drawwid.pro, line 64, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spectrumimage_drawwid, event, event_origin, state, error=

This routine fills the draw widget of the spectrum image.

Input parameters:
eventThe event structure.
event_originA scalar string with the widget type.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrumimage_mfactor.pro, line 67, last changed at 2019-01-02 by christersandin (revision 5163)

p3d_display_sv_event_spectrumimage_mfactor, value, state, /stateload, error=

This routine selects the viewed spectrum image multiplication factor.

Input parameters:
valueA scalar decimal value that sets the factor.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrumimage_select.pro, line 67, last changed at 2019-01-02 by christersandin (revision 5163)

p3d_display_sv_event_spectrumimage_select, value, state, /stateload, error=

This routine selects the viewed spectrum image.

Input parameters:
valueA scalar integer that specifies the chosen setup.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrumimage_wavelength_bandwidth.pro, line 64, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spectrumimage_wavelength_bandwidth, in_value, state, error=

This routine sets the spectrum image bandwidth used when calculating the spatial map.

Input parameters:
in_valueThe value.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrumimage_wavelength_bin.pro, line 159, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spectrumimage_wavelength_bin, index, event_id, event_origin, state, error=

This routine sets the wavelength bin and related widgets.

Input parameters:
indexA scalar integer that specifies the originating widget.
event_idA scalar integer with the ID of the originating text widget.
event_originA string with the event structure name.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spectrumimage_whitelight.pro, line 62, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spectrumimage_whitelight, state, error=

This routine sets the widgets related to the use of the white-light functionality.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_spview.pro, line 64, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_spview, value, nwave=, state=, error=

Moves the active-widget identifier '*' from one widget and adds it to another.

Input parameters:
valueA scalar integer indicating what to do.
stateThe p3d state structure.

routines/p3d_display_sv_event_sum_up_bins.pro, line 68, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_sum_up_bins, state, nbins, binlow, binupp, marr, dmarr, /bindata

Sums up image elements to create a binned spatial map image.

Input parameters:
stateThe state structure of p3d_sv.
Side effects:

The GUI creates an event when it is closed, which is caught by the p3d main GUI event handler.

routines/p3d_display_sv_event_sum_up_map.pro, line 68, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_sum_up_map, state, nbins, binlow, binupp, marr, dmarr, /bindata

Sums up wavelength bins to create a spatial map image.

Input parameters:
stateThe state structure of p3d_sv.
Side effects:

The GUI creates an event when it is closed, which is caught by the p3d main GUI event handler.

routines/p3d_display_sv_event_sum_up_spectrum.pro, line 66, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_sum_up_spectrum, state, loop=, error=, errmsg=

Co-adds all marked spectra.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_tab.pro, line 64, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_tab, state, event_index, error=

This routine activates the selected tab.

Input parameters:
stateThe state structure of p3d_sv.
Optional parameters:
event_indexThe index of the selected entry in the dropplist.

routines/p3d_display_sv_event_targetsetup.pro, line 299, last changed at 2020-08-27 by christersandin (revision 5463)

p3d_display_sv_event_targetsetup, index, event, state, error=

This routine updates the target-related widgets:

Input parameters:
indexA scalar integer that specifies the originating widget.
eventThe event structure.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_telescl_postable.pro, line 800, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_event_telescl_postable, vector, xsize, ysize, orientation=, indicatecurrent=, angle=, locut=, hicut=, contours=, fpos=, plotmarks=, polygons=, mindex=, allplot=, bg_mindex=, arrow=, /cinv, cindex1=, cindex2=, cindex3=, cindex4=, colorfg=, colorbg=, bottom=, noerase=, /annotate, nyoffset=, bin=, windex=, viewport=, winpos=, /cube, nthreads=, vsize=, drawid=, cshlib=, /noC, topwid=, logunit=, verbose=, error=, /debug, /help

This display tool shows a spatial map of all elements of an IFU. It is necessary to specify a fiber position table.

Input parameters:
vectorA one-dimensional array of floating point values, which is used to calculate the color of every individual spatial element.
xsizeA scalar integer specifying the x-size of the plot.
Optional parameters:
ysizeA scalar integer specifying the y-size of the plot. The default value is: xsize
Keyword parameters:
orientationA scalar integer specifying how the data are oriented. The following values are recognized:

0

up-E, left-S

1

up-N, left-E (default)

2

up-W, left-N

3

up-S, left-W

The default value is: 1
indicatecurrentA one- or two-element array that indicates if the currently selected element should be marked. This parameter is only used if PLOTMARKS == 0. If INDICATECURRENT is a two-element array then the second element is re-drawn, the first element is always marked.
angleA decimal scalar specifying the angle of the IFU with respect to the default orientation where the North and East axes are aligned with the axes of the IFU. Specified in degrees. The default value is: 0.0
locutA decimal scalar that is used as the lower cut in scaling colors. If neither LOCUT nor HICUT is set then these are set as the minimum and maximum values of VECTOR.
hicutA decimal scalar. For further information, see LOCUT.
contoursIf this keyword is set then a border is drawn around every element.
fposAn IDL structure with all used fiber-position data.
plotmarksA scalar integer specifying if each spaxel marked in MARKS should be overplotted with a wireframe; 0 || 1. The default value is: 0
polygonsIf this keyword is set, spatial elements are drawn with polygons instead of as an image. The default value is that polygons is set, unless square elements are used andthe keyword VIEWPORT is unavailable.
mindexA two-element unsigned integer array that defines which marks to view; all values in MARKS > 1 can be considered. The second value indicates the background region used with the index. The default value is: 2 ^ 32 – 1
allplotSet this keyword to plot all used regions.
bg_mindexA 1024-element unsigned integer array that indicates the background index used with the current index (mindex[0]).
arrowIf this keyword is set, a directional arrow is drawed on top in the following corner:

orientation == 0

lower left corner

orientation == 1

lower right corner

orientation == 2

upper right corner

orientation == 3

upper left corner

cinvA keyword indicating if the foreground & background colors are inverted.
cindex1A color index used with wireframe over plots. The default value is: 0
cindex2A color index used with wireframe over plots. The default value is: 2
cindex3A color index used with wireframe over plots. The default value is: 3
cindex4A color index used with wireframe over plots. The default value is: 4
colorfgThe foreground color, used with image plots.
colorbgThe background color, used with image plots.
bottomThe lower index used in the color table. The default value is: 0
noeraseIf this keyword is set the plot window is not erased prior to drawing a new plot.
annotateThe spectrum row number and identification string are printed on top of each other and the spectrum if this keyword is set.
nyoffsetA scalar decimal value that specifies the y-axis offset of the plot from the lower edge; given in normal units. The default value is: 0.0
binA scalar integer that defines how pixels are rebinned. The default value is: 1
windexThe plotted spatial map is saved to the indicated window index, when the value is positive. The default value is: -1
viewportA two-value integer array with the used view port of the spatial map.
winposA two-element integer array that specifies the offset position of the lower-left corner of the spatial-map data to plot.
cubeAssuming cube input.
nthreadsThe number of threads to use in the various C-based routines.
vsizeA two-integer array that specifies the size of the virtual spatial map that shows all elements and not only those that are seen using the current binning.
drawidA scalar integer with the draw widget ID.
cshlibA scalar string with the C-library name.
noCSet this keyword to avoid using C-based routines.
topwidIf this keyword is set, error messages are displayed using DIALOG_MESSAGE, with this widget id as DIALOG_PARENT, instead of MESSAGE.
logunitMessages are saved to the file pointed to by this logical file unit, if it is defined.
verboseSet this parameter to a positive scalar integer to make p3d write some information on STDOUT about what is going on. The following four values are acknowledged:

0

Writes no information at all. This is the default.

1

Writes the more important information; regarding subroutine configurations, mostly.

2

Writes most information; includes a more verbose output than 1.

3

Writes all information, including information on the execution state of GUI subroutines. This may be a useful mode when debugging the code.

errorThis scalar integer returns an error code if set. Any value different from zero means that an error has occurred.
debugNo error handler is setup if this keyword is set. The default is otherwise to setup an error handler (using the routine CATCH), which makes each subroutine exit quietly in case a bug is encountered. Use this keyword when debugging p3d.
helpSet this keyword to show this routine documentation, and then exit.

routines/p3d_display_sv_event_tvimage.pro, line 66, last changed at 2016-02-18 by christersandin (revision 4000)

p3d_display_sv_event_tvimage, state

Sets up the spectrum image array in p3d_sv.

Input parameters:
stateThe p3d_sv state structure.

routines/p3d_display_sv_event_verbose.pro, line 63, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_display_sv_event_verbose, index, str, state, error=

This routine updates verbosity related widgets.

Input parameters:
indexA scalar integer with the widget index.
strA scalar string.
stateThe state structure of p3d_sv.

routines/p3d_display_sv_event_wcs_update.pro, line 67, last changed at 2018-05-02 by christersandin (revision 4902)

p3d_display_sv_event_wcs_update, state

Updates the World Coordinate System information used by p3d.

Input parameters:
stateThe p3d_sv state structure.
zhdrA secondary FITS header.

routines/p3d_display_sv_read_parameters.pro, line 62, last changed at 2018-08-01 by christersandin (revision 5016)

p3d_display_sv_read_parameters, state, error=

Reads instrument parameters for the spectrum viewer.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_sv_sensfunc_plot.pro, line 572, last changed at 2019-12-08 by christersandin (revision 5316)

p3d_display_sv_sensfunc_plot, state, /remove, wrotefilename=, savesensfunc=, /psplot, /redraw, /sfcal_select, /sfext_select, error=

Draws sensitivity-function related plots in the p3d spectrum viewer.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_display_tele.pro, line 115, last changed at 2015-10-19 by christersandin (revision 3628)

p3d_display_tele, array, lcut, hcut, xsize, ysize, xpos=, ypos=, cubic=, interp=, minus_one=, true=, bottom=, clean=, topwid=, logunit=, verbose=, error=, /debug, /help

This routine is a replacement for TV that can also enlarge the image and assign the data a color table.

Input parameters:
arrayA 2D-array, which must be compatible with float.
lcutfloat, color= 0 is set to the data value lcut.
hcutfloat, color=255 is set to the data value hcut.
Keyword parameters:
xposA scalar integer; defines the x-position of the lower left corner. The default value is: 0
yposA scalar integer; defines the y-position of the lower left corner. The default value is: 0
cubicA scalar float -1<=cubic<=0. Determines if cubic interpolation is to be used. The default value is: 0
interpUses linear interpolation if set. The default value is: 0
minus_oneInterpolates on image borders when set. The default value is: 0
trueSets the TRUE keyword of TV (0 <= TRUE <= 3). The default value is: 0
bottomThe lower index used in the color table. The default value is: 0
cleanThe plot window is simply cleared with the color index of this variable if this variable is set to anything but -1. The default value is: -1
topwidIf set, then error messages are displayed using DIALOG_MESSAGE, using this widget id as DIALOG_PARENT, instead of MESSAGE.
logunitMessages are saved to the file pointed to by this logical file unit, if it is defined.
verboseSet this parameter to a positive scalar integer to make p3d write some information on STDOUT about what is going on. The following four values are acknowledged:

0

Writes no information at all. This is the default.

1

Writes the more important information; regarding subroutine configurations, mostly.

2

Writes most information; includes a more verbose output than 1.

3

Writes all information, including information on the execution state of GUI subroutines. This may be a useful mode when debugging the code.

errorThis scalar integer returns an error code if set. Any value different from zero means that an error has occurred.
debugNo error handler is setup if this keyword is set. The default is otherwise to setup an error handler (using the routine CATCH), which makes each subroutine exit quietly in case a bug is encountered. Use this keyword when debugging p3d.
helpSet this keyword to show this routine documentation, and then exit.

routines/p3d_fastview_event.pro, line 1087, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_fastview_event, event

Handles the widget events of p3d fastview.

Input parameters:
eventThe event structure of p3d_fastview.

routines/p3d_misc_state_load.pro, line 131, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_misc_state_load, state, tool_auto=, /auto, restorestate=, image_filename=, /noerrors, /file_read, verbose=, debug=, error=

This routine loads a saved session setup from a plain-text file.

Input parameters:
stateThe state structure of p3d_sv.

routines/p3d_misc_state_save.pro, line 155, last changed at 2022-07-15 by christersandin (revision 5654)

p3d_misc_state_save, index, state, error=

This routine saves the GUI setup of the spectrum viewer or the automatic reduction tool to a plain-text file.

Input parameters:
stateThe state structure to use (of p3d_sv or p3d_autoreduce).

routines/p3d_sv_cw_regstat.pro, line 214, last changed at 2016-04-29 by christersandin (revision 4148)

wid = p3d_sv_cw_regstat(p3d_sv_cw_regstat, parent, label, /wide, tracking_events=, font=, resource_name=, uvalue=, uname=, tab_mode=)

Creates a compound widget to show region statistics information.


page last updated on: Sunday January 1, 2023 16:54:33; retrieved on: Thursday November 21, 2024 08:46:17