Spydr Introduction and features
Invoking Spydr
Screenshots
Detailled Shortcut Help
Downloading and Installing
Bugs

Spydr Introduction and features

Let me introduce spydr (pronounce spider).

OS Warning: This tool uses gtk (the gimp tool kit). It should run without any problem on any linux box, and we have made it run under OsX (it takes a bit of work; we are currently writing a tutorial on how to make yorick gtk GUIs run on this platform). It should theoretically run on windows (there's a gtk port) but we have never tried it (if you try and succeed, let me know).

Spydr stands for "Software Package in Yorick for Data Reduction", but in fact, the realization fell (to date) a bit short of the initial goals, and what it does is mostly provide a convenient interface for data visualization and basic analysis.

The spydr GUI provides:

With spydr, you can:

See screenshots below.

Invoking spydr:

From the command line

Providing the spydr executable (that should come with the spydr distribution) is in your path, you can invoke spydr from the command line:

spydr [ options ] image1.fits [ image2.fits ... ]

where the fits images can contain single images (not necessarily of the same size) or data cube. Widlcards are allowed in names.

Example:

spydr --compact --dpi 80 ngc3040.fits 20070218_5?.fits datacube[1-2].fits

See "command line options" below.

From within yorick

spydr accepts either yorick arrays (2D or 3D), or filenames (possibly with wildcards). Examples:

#include spydr.i
spydr,im1,"image2.fits",datacube
spydr,"image3.fits",append=1

The include should not be necessary as spydr comes with an autoload file.

Spydr keywords are:

keywordmeaning
wavelength= Wavelength. Scalar, so will be the same for all images passed as arguments.
pixsize= Image pixel size (or plate scale). Scalar, so will be the same for all images passed as arguments.
name= Name to use for the image(s) passed as argument. Scalar too (to be fixed).
append= Append the images passed as argument to the current image stack.
hdu= Read given fits HDU (only has sense if argument is a filename).
compact= open compact spydr GUI (don't show lower pane).

Command line options

When started from the shell, spydr accepts a number of options. From the spydr man page:

option flagcomment
--conf file configuration file (spydr looks by default in ./ then Y_USER then Y_SITE then /etc). This will override the default.
--hdu value Specify a fits HDU to read
--dpi value Yorick dpi value (yorick default = 75, spydr default = 83). Any value between 30 and 150 make sense on most screens
--itt value Intensity Transfer Table (1=linear, 2=sqrt, 3=square, 4=log, 5=histogram equalized)
--pixsize value Pixel size (or plate scale) in arcsec
--boxsize value Size of box for PSF fitting and Strehl calculation (pixels)
--saturation value Value above which pixels have to be considered as saturated (ADU)
--wavelength value Force wavelength for all images
--zeropoint value Photometric zeropoint (magnitudes)
--nbins value Number of bins for histograms
--strehlaper value Diameter of circular mask for Strehl calculations (pixels). The flux is integrated in a circle of this diameter, while the sky is estimated from the remaining pixels within the box of size "boxsize"
--batch Turn on yorick batch mode (yorick quits when encountering an error). This flag is recommended when starting spydr from a non-interactive session (e.g. from a gnome applet).
--debug Turn on the verbose mode (debugging mode)
--invert Invert LUT
--fullgui Show the plugin pane when the GUI is realized
--compact Hide the lower part of the GUI at startup

Parameters set from the command line options will supersede values defined in the configuration file.

Screenshots

Spydr default (left), compact (right) GUI, and shorcuts help window :

Spydr menus

Detailled shortcut help:

Notes:

  1. "*visible* image" refers to the image as seen in the image area. This will differ from the image itself if the image has been zoomed or if cuts have been applied (which they are by default, unless you used "E", see below).
  2. In compact mode, the left menu bar is not entirely visible (some items are hidden). You can make them visible by toggling the compact flag (Ctrl+L) or by using larger dpi (Ctrl++, items will appear as the image area gets larger).
  3. You can hit a shortcut key when the mouse is anywhere within the image or plot graphic areas (even though for some of them, it only makes sense when the mouse is within the image).

KeyAction
x This will plot (in the 1D graphical area) the line of the visible image at the current mouse position. If the image has been zoomed, the limits of the 1D plot are set as the x0 and x1 limits of the image (even though the whole line has been plot, so you can unzoom it with your mouse -right click-). The range of the plot is set as cmin and cmax (you can also unzoom and interactively change the range with the mouse).
y Same as "x", but for a column instead of a line.
X or Y Toggle the line/column plotting. Plots will continuously be drawn as you move the mouse across the image. Just type "X" (or "Y") again to toggle it off.
c Interactively define the start and end of the cross section. Type "c", then click and drag to define the segment (line) over which you want to plot the image cross section (cut)
h Plot the histogram of the visible image. This is also affected by the current cmin and cmax. You can set the histogram binsize (histbinsize) from the GUI (lower left menu). Change cmin and cmax to change the low and high histogram values.
r Radial plot of all pixels in visible image. The center is defined by the current position of the mouse. The plot is symmetrized, mostly to make possible a future fit.
F Linear fit to whatever is displayed in the plot area. The fit is over plotted (in red) and the fit coefficients will be reported in the status bar.
f Same, for a Gaussian fit.
E Set cmin and cmax to the min and max of the visible image
e set cmin and cmax to 10% and 99% of the image cumulated histogram (i.e. 10% of the image pixel will be below cmin and 1% above cmax). For astronomical images, or images with a few positive perturbations above a noisy background, this is usually a much better solution than "E"
n Display the next image in the stack
p Display the previous image in the stack
D Delete the current image from the image stack
R Replace the current image in stack by the displayed image. This requires an explanation: When you do actions on an image (e.g. rebin, or filter cosmics, or smooth), only the displayed image is affected. That is, the stack image stays the same. So if you switch to another image in the stack and come back to the one for which the actions were done, you will get the original image. To record/validate your changes, use "R". This will actually replace the current stack image with the processed image, which you can then save, or continue processing.
s Cosmic ray removal (spatial sigma filter). Note that you can set the number of sigmas in the spydr configuration file.
S Smooth out image (uses yorick's smooth function).
+ and - Increase (resp. decrease) zoom factor of the zoom window.
u unzoom (and unset limits of) image window.
M and m Useful to determine distance between 2 points. Use "M" to set your coordinate reference (the point to which you want to measure the distance). Then, use "m" to mark a point for which you want the distance (in pixels or arcsec) to the reference point. You can use "m" repetitively after that. Use "M" to set a new coordinate reference.
? Pop up the shortcut help window.

Other shortcuts

There is a number of menu accelerators too. Hit Ctrl (control) and another key.

Key Action
Ctrl+O Open new image or data cube from a file open dialog.
Ctrl+A Same as open, but append the new image or data cube to the image stack (preserving the existing images). Switch to other images in the stack using the shortcuts "n" or "p", or by picking the image from the "image" menu.
Ctrl+S Save current displayed image (entire image). This will include any processing done to the image.
Ctrl+Q Quit spydr (killing the window has the same effect). This will also quit the yorick session if spydr has been invoked from the shell (or from a non-interactive session). It will only quit the GUI if spydr was invoked from within yorick (and a new GUI can be started later in the same yorick session).
Ctrl+J Export current image window to a JPEG file.
Ctrl+R Refresh image window (redisplay image). This will cancel all processing done to the image, or will erase any overlay.
Ctrl++ (control+plus, generally ctrl+shift+equal). Enlarge graphic areas by using a larger dpi number for the yorick graphic windows.
Ctrl+- Shrink graphic areas.
Ctrl+= Reset dpi number to the spydr session default (defined in the spydr.conf file).
Ctrl+L Show/hide lower graphic panel (plot window).
Ctrl+P Show/hide plugin/add-on right menu bar.
Ctrl+H Pop up the shortcut help window (same as "h" shortcut).

Downloading and Installing

Linux

If you use linux, you can use our repositories, or download debs or rpms from the same place (debian, ubuntu, fedora8 (spydr is in noarch), mandriva2008.0) Alternatively, you can also use yorick's package manager (Include "pkg_mngr.i" and type "pkg_setup"), or you can install from sources.

OsX

On OSX, you can use the yorick package manager (Include "pkg_mngr.i" and type "pkg_setup"), or you can install from sources. Soon coming: a tutorial on how to install the gtk environment on OsX and make the yorick GUI work with it.

Windows

You should be able to install from sources in cygwin. As far as installing gtk and make yorick work with it, Google is your friend...(let me know if you succeed so that we can update this page)

Integration with gnome

If you use gnome and install spydr with a deb, you should have spydr in your gnome menu under "education" (ubuntu) or "math" (debian). If you install it from source, or using pkg_mngr, and want to create the entry, all it takes it a desktop (ubuntu) or menu (debian) file, the spydr icon (spydr.xmp) and some search on the web (in ubuntu, just put the spydr.desktop in /usr/share/applications/ and run update-menus from the CLI. Then, you can set up your environment to make spydr your default application when you click on fits files.

Bugs

Yes, there are many of these. If you encouter a bug which is not listed below, please drop me an email with a description of it (as complete as possible).