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

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 optimal 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_determine_marked_elements
Calculates which spatial elements are marked.
PROp3d_display_sv_event_emissionline_dialog
Provides a GUI to select an emission line.
PROp3d_display_sv_event_emissionline_read
Reads the contents of a plain-text file with emission-line entries.
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.
FUNCTIONp3d_display_sv_event_nestr
Formats strings.
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_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_select_region
Selects the spatial elements region.
PROp3d_display_sv_event_siview
Controls the spectrum-image viewport setup.
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_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_waverange_shift
Handles wavelength range shift events of the p3d spectrum viewer.
PROp3d_display_sv_event_waverange_zoom
Handles wavelength range zoom events of the p3d spectrum viewer.
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.
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 644, last changed at 2015-10-19 by christersandin (revision 3628)

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 2017-06-06 by christersandin (revision 4602)

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 optimal 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 401, last changed at 2017-06-06 by christersandin (revision 4602)

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 64, last changed at 2015-12-11 by christersandin (revision 3891)

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 2016-07-08 by christersandin (revision 4304)

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_determine_marked_elements.pro, line 63, last changed at 2016-04-06 by christersandin (revision 4069)

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_emissionline_dialog.pro, line 112, last changed at 2016-04-15 by christersandin (revision 4115)

p3d_display_sv_event_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_emissionline_read.pro, line 62, last changed at 2016-04-12 by christersandin (revision 4103)

p3d_display_sv_event_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_find_closest_element.pro, line 64, last changed at 2015-12-13 by christersandin (revision 3908)

p3d_display_sv_event_find_closest_element, x, y, xsize, ysize, id, rownum, fiberpos=, orientation=, pos=, mask=, /usesky, /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_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_plot.pro, line 168, last changed at 2016-07-20 by christersandin (revision 4370)

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_regions_load.pro, line 66, last changed at 2016-05-26 by christersandin (revision 4168)

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 510, last changed at 2016-05-26 by christersandin (revision 4168)

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 63, last changed at 2016-04-06 by christersandin (revision 4071)

p3d_display_sv_event_regions_save, state, filename, 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 62, last changed at 2016-04-14 by christersandin (revision 4113)

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 61, last changed at 2016-06-09 by christersandin (revision 4200)

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_select_region.pro, line 61, last changed at 2016-03-23 by christersandin (revision 4043)

p3d_display_sv_event_select_region, state, event, index=, error=

Selects the spatial elements region.

Input parameters:
stateThe p3d state structure.

routines/p3d_display_sv_event_siview.pro, line 63, last changed at 2015-12-07 by christersandin (revision 3844)

p3d_display_sv_event_siview, index, event, state=, error=

Controls the spectrum-image viewport setup.

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

routines/p3d_display_sv_event_spview.pro, line 63, last changed at 2016-05-26 by christersandin (revision 4166)

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 63, last changed at 2016-07-12 by christersandin (revision 4343)

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 63, last changed at 2016-07-12 by christersandin (revision 4338)

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 62, last changed at 2016-07-20 by christersandin (revision 4368)

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_telescl_postable.pro, line 797, last changed at 2016-07-12 by christersandin (revision 4340)

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=, /crebuild, /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.
crebuildSet this keyword to rebuild the C library.
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 62, 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_waverange_shift.pro, line 63, last changed at 2016-06-14 by christersandin (revision 4208)

p3d_display_sv_event_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_waverange_zoom.pro, line 63, last changed at 2016-06-14 by christersandin (revision 4208)

p3d_display_sv_event_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_wcs_update.pro, line 62, last changed at 2015-12-17 by christersandin (revision 3953)

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 61, last changed at 2015-12-15 by christersandin (revision 3938)

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 564, last changed at 2017-04-13 by christersandin (revision 4547)

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_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: Monday November 6, 2017 17:50:22; retrieved on: Saturday November 25, 2017 01:40:09