SNID Frequently Asked Questions
You are here:
Software >
SNID >
Frequently Asked Questions
You can also access:
manual
Contents:
Installation problems and Compilation errors |
Runtime errors |
General questions
Installation problems and Compilation errors
NOTE: If you do get error messages after typing "make" then make
sure you clean up before attempting to recompile. This is done by
typing:
make realclean ; make
If the compilation then succeeds you can type 'make install'
to copy the executable files to the bin/ directory.
- I do not have a Fortran compiler on my
computer. Where can I get one?
- PGPLOT is not installed on my computer. How do I
install it?
- PGPLOT yields a link error: "ld: cannot find -lpgplot"
- libpgplot.so gives an error "undefined reference to 'png_...'"
- libpgplot.so gives an error "undefined reference to
" followed by incomprehensible symbols (e.g. e_wsfe, s_rsfe, do_uio etc.)
- libpgplot.so gives an error "cannot open shared
object file: No such file or directory"
Runtime errors
- Everything works fine until the interactive
plotting: "ERROR: unable to open graphic device."
- PGPLOT complains it can't read the font file
"grfont.dat" or that it couldn't find the program "pgxwin_server"
- PGPLOT complains: "%PGPLOT: selected graphics
device is not open"
- SNID quits prematurely with a
"Segmentation fault."
- I found a bug/problem in SNID. What should I do?
General questions
- I don't really understand the text or graphical
output. Is there a manual for SNID?
- The redshift values output by SNID are way
off. Can I restrict the redshift range in some way?
- The ages of the SN templates that show up in the
Template Listings have a huge scatter. Is this normal?
- Is it possible that my input spectrum is of a
different (sub)type than the "favoured (sub)type" output by SNID?
- The input spectrum is heavily contaminated by
galaxy/sky emission lines. Will this affect SNID?
- The input spectrum is noisy at the blue/red
ends. Will this affect SNID?
- There are chip gaps in my input spectrum. Can I
mask out specific wavelength intervals?
- What does SNID stand for?
Compilation errors
I do not have a Fortran compiler on my computer. Where can I get one?
Mac PPC and Intel:
You can install g77 and gfortran binaries at High-performance computing for Mac
OS X. Note that you will need to have Apple's Developer Tools
installed. They are included on a separate CD in the retail version of
OS X and also available as a free download from Apple's Developer Site.
UNIX/Linux/etc.:
You can install g77 or gfortran through the GNU Compiler Collection (GCC). Note
that the final release of g77 is in GCC version 3.4. Future versions
of GCC have gfortran instead.
PGPLOT is not installed on my computer. How do I install it?
Mac PPC and Intel:
You can download Scisoft
OSX, which (amongst many other things) includes PGPLOT. Scisoft
OSX is available for both Mac PPC and Intel.
PGPLOT is also available as an "unstable package" through Fink. "Unstable" packages can be
made available in Fink Commander by checking "Use unstable packages"
in the "Fink" tab of the Fink Commander Preferences panel. If you use
the command line version of Fink, then you will need to edit
/sw/etc/fink.conf, add unstable/main and
unstable/crypto to the Trees: line, and then run
fink selfupdate; fink index. You can then install the Package
pgplot by typing:
fink install pgplot
at the terminal prompt.
UNIX/Linux/etc.:
You can download PGPLOT here. That
website also includes installation
instructions for UNIX, Linux, VMS, and Windows. Part of the
installation requires you select specific device drivers from a
file called drivers.list. For SNID, the only device drivers
you will need are:
AQDRIV 0 /AQT AquaTerm.app under Mac OS X C <=== ONLY FOR MAC OSX!
PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77
PSDRIV 3 /CPS PostScript printers, color, landscape Std F77
XWDRIV 1 /XWINDOW Workstations running X Window System C
XWDRIV 2 /XSERVE Persistent window on X Window System C
although the complete recommended list is:
AQDRIV 0 /AQT AquaTerm.app under Mac OS X C <=== ONLY FOR MAC OSX!
GIDRIV 1 /GIF GIF-format file, landscape
GIDRIV 2 /VGIF GIF-format file, portrait
LXDRIV 0 /LATEX LaTeX picture environment
PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77
PSDRIV 2 /VPS Postscript printers, monochrome, portrait Std F77
PSDRIV 3 /CPS PostScript printers, color, landscape Std F77
PSDRIV 4 /VCPS PostScript printers, color, portrait Std F77
TTDRIV 4 /GTERM GTERM Tektronix terminal emulator Std F77
TTDRIV 5 /XTERM XTERM Tektronix terminal emulator Std F77
WDDRIV 1 /WD X Window dump file, landscape
WDDRIV 2 /VWD X Window dump file, portrait
XWDRIV 1 /XWINDOW Workstations running X Window System C
XWDRIV 2 /XSERVE Persistent window on X Window System C
NOTE: Do not install any of the widget drivers unless you are
planning to develop programs that will use them.
PGPLOT yields a link error: "ld: cannot find -lpgplot"
This means SNID is not finding the pgplot libraries. You need to locate
libpgplot.* and add its location to the Makefile. This means editing the
PGLIBS setting to reflect the location of these libraries. E.g., assuming
the libpgplot.so library is in /opt/lib/pgplot/:
PGLIBS= -L/opt/lib/pgplot -lpgplot
libpgplot.so gives an error "undefined reference to 'png_...'"
This means SNID is not finding the png libraries. You need to locate
libpng.* and add its location to the Makefile. This means editing the
PGLIBS setting to explicitely add the libpng library. E.g., assuming
the libpng.so library is in /usr/lib/:
PGLIBS= -L/usr/local/pgplot -lpgplot /usr/lib/libpng.so
NOTE: the PGPLOT libraries may not be located at
/usr/local/pgplot/. If this is the case, edit the PGLIBS settings
accordingly.
libpgplot.so gives an error "undefined reference to
" followed by incomprehensible symbols (e.g. e_wsfe, s_rsfe, do_uio etc.)
This could mean that PGPLOT was compiled with a different fortran
compiler than you're trying with SNID. For instance, if attempting
to compile SNID with gfortran when PGPLOT was compiled with g77, you'd
get something like:
libpgplot.so: undefined reference to `e_wsfe'
libpgplot.so: undefined reference to `s_rsfe'
libpgplot.so: undefined reference to `s_cmp'
libpgplot.so: undefined reference to `do_uio'
libpgplot.so: undefined reference to `e_rsfe'
libpgplot.so: undefined reference to `f_inqu'
libpgplot.so: undefined reference to `e_rsue'
libpgplot.so: undefined reference to `i_indx'
libpgplot.so: undefined reference to `do_fio'
libpgplot.so: undefined reference to `e_wsfi'
libpgplot.so: undefined reference to `s_cat'
libpgplot.so: undefined reference to `s_stop'
libpgplot.so: undefined reference to `s_wsfi'
libpgplot.so: undefined reference to `G77_getenv_0'
libpgplot.so: undefined reference to `s_rsue'
libpgplot.so: undefined reference to `f_clos'
libpgplot.so: undefined reference to `f_open'
libpgplot.so: undefined reference to `s_wsfe'
libpgplot.so: undefined reference to `s_copy'
collect2: ld returned 1 exit status
make: *** [snid] Error 1
libpgplot.so gives an error "cannot open shared
object file: No such file or directory"
This generally means you have not set the LD_LIBRARY_PATH and
PGPLOT_DIR environment variables to point to the PGPLOT installation
directory (see the note in the Makefile and the
Installation
instructions).
[in (t)csh]
setenv LD_LIBRARY_PATH /usr/local/pgplot
setenv PGPLOT_DIR /usr/local/pgplot
[in bash]
export LD_LIBRARY_PATH="/usr/local/pgplot"
export PGPLOT_DIR="/usr/local/pgplot"
NOTE: the PGPLOT installation directory may not be located at
/usr/local/pgplot/. If this is the case, edit the LD_LIBRARY_PATH and
PGPLOT_DIR settings accordingly.
Runtime errors
Everything works fine until the interactive
plotting: "ERROR: unable to open graphic device."
This generally means you have not set the LD_LIBRARY_PATH and
PGPLOT_DIR environment variables to point to the PGPLOT installation
directory (see the note in the Makefile and the
Installation
instructions).
[in (t)csh]
setenv LD_LIBRARY_PATH /usr/local/pgplot
setenv PGPLOT_DIR /usr/local/pgplot
[in bash]
export LD_LIBRARY_PATH="/usr/local/pgplot"
export PGPLOT_DIR="/usr/local/pgplot"
NOTE: the PGPLOT installation directory may not be located at
/usr/local/pgplot/. If this is the case, edit the LD_LIBRARY_PATH and
PGPLOT_DIR settings accordingly.
PGPLOT complains it can't read the font file
"grfont.dat" or that it couldn't find the program "pgxwin_server"
This generally means you have not set the LD_LIBRARY_PATH and
PGPLOT_DIR environment variables to point to the directory containing
the libpgplot.* library (see the note in the Makefile and the
Installation
instructions).
[in (t)csh]
setenv LD_LIBRARY_PATH /usr/local/pgplot
setenv PGPLOT_DIR /usr/local/pgplot
[in bash]
export LD_LIBRARY_PATH="/usr/local/pgplot"
export PGPLOT_DIR="/usr/local/pgplot"
NOTE: the PGPLOT libraries may not be located at
/usr/local/pgplot/. If this is the case, edit the LD_LIBRARY_PATH and
PGPLOT_DIR settings accordingly.
PGPLOT complains: "%PGPLOT: selected graphics device is not open"
I encountered this problem with the
Scisoft
OSX distribution of PGPLOT on a Mac Intel. The problem was that
the "/XSERVE" device driver was commented out in the
drivers.list file in the pgplot directory
(
/scisoft/i386/Packages/pgplot-5.2.2/ for the Mac Intel
distribution):
! XWDRIV 2 /XSERVE Persistent window on X Window System C
(The
! at the start of the line means it is commented
out). If this is the case, or if any of the following lines are
commented out:
AQDRIV 0 /AQT AquaTerm.app under Mac OS X C
PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77
PSDRIV 3 /CPS PostScript printers, color, landscape Std F77
XWDRIV 1 /XWINDOW Workstations running X Window System C
XWDRIV 2 /XSERVE Persistent window on X Window System C
then this means you have to recompile PGPLOT. No worries, it isn't
that complicated! Follow these steps and you should be fine:
- go to the pgplot installation directory (here I assume it's
/scisoft/i386/Packages/pgplot-5.2.2/):
cd /scisoft/i386/Packages/pgplot-5.2.2/
- edit the drivers.list file and uncomment (remove the
! at the start of the line) the following lines:
AQDRIV 0 /AQT AquaTerm.app under Mac OS X C
PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77
PSDRIV 3 /CPS PostScript printers, color, landscape Std F77
XWDRIV 1 /XWINDOW Workstations running X Window System C
XWDRIV 2 /XSERVE Persistent window on X Window System C
your drivers.list file should look something like this.
- generate the Makefile using the makemake command:
sudo ./makemake . macosx g77_gcc_AQT [if you use g77 as your fortran compiler]
OR sudo ./makemake . macosx gfortran_gcc_AQT [if you use gfortran as your fortran compiler]
which should produce the following output:
Reading configuration file: ./sys_macosx/g77_gcc_AQT.conf
Selecting uncommented drivers from ./drivers.list
Found drivers AQDRIV PSDRIV XWDRIV
Creating make file: makefile
Determining object file dependencies.
- compile PGPLOT using the make command:
sudo ./make
- recompile SNID by executing the following commands in the SNID
installation directory (snid-5.0/):
make realclean ; make
make install
If the steps above do not work, then you should try using the Fink
distribution of PGPLOT instead (see
above).
SNID quits prematurely with a "Segmentation fault."
This should never have happened. Please email me so we can figure out
a solution:

. In your email, you should specify your OS, fortran
compiler, and the complete screen output up until the error is
generated.
I found a bug/problem in SNID. What should I do?
Well, that is possible. Please email me so we can figure out
a solution:

. Make sure to include all the relevant information (as well
as your OS and fortran compiler).
General questions
I don't really understand the text or graphical output. Is there a
manual for SNID?
Sure there is. Check out the online
manual,
which includes an
example
run. Note that this is a replica of the Howto.snid file in the
doc/ subdirectory of the snid distribution.
The redshift values output by SNID are way
off. Can I restrict the redshift range in some way?
Yes. If you know the host galaxy redshift, you can force the
intial redshift estimate with the
forcez option. If you only have a rough
idea of the redshift, you can restrict the redshift interval using the
z and
dz options. Look at the examples in the
other examples section of the online
manual.
The ages of the SN templates that show up in the
Template Listings have a huge scatter. Is this normal?
There is a strong anti-correlation between redshift and age estimates
(i.e. over-estimating the redshift leads to under-estimating the age)
due to the shift of supernova absorption features to the red with age
(see Blondin & Tonry 2007 [
ADS,
astro-ph] for
more details). You can see this clearly with the "z/t" button in the
interactive graphics window (see also this
example plot). However, if you have some
external constraint on the age of the SN spectrum, you can then
restrict the correlation to templates within a certain age interval
using the
agemin,
agemax,
age, and
dage options. Look at the examples in the
other examples section of the online
manual.
Is it possible that my input spectrum is of a
different (sub)type than the "favoured (sub)type" output by SNID?
The type determination algorithm is far from
perfect (see the
example run), and its
efficiency varies with SN type, age, and redshift
(see Blondin & Tonry 2007 [
ADS,
astro-ph] for
a lengthy discussion). This is in part due to the incompleteness of
the spectral database, as some supernova types (e.g. non-"normal" SN
Ia, SN Ib/c) are presently under-represented. It is strongly
advisable to
look at the best 5 or so template matches to make a
judgment call. While running SNID on large datasets, however, this is
unpractical, so one has to resort to this automated classification
scheme. In Miknaitis et al. 2007 [
ADS,
astro-ph], for
example, high-redshift supernovae from the ESSENCE survey were
classified as 'Ia' if the best-match template was a 'Ia'
and at
least 50% of templates with rlap ≥ 5.0 were of the same type.
The input spectrum is heavily contaminated by
galaxy/sky emission lines. Will this affect SNID?
Yes. You should clip galaxy emission lines using the
emclip option. If there are also strong
sky lines, you can clip them by setting
skyclip=1. Look at the examples in the
other examples section of the online
manual.
The input spectrum is noisy at the blue/red
ends. Will this affect SNID?
Yes. You should exclude noisy edges in the correlation by
using the
wmin and
wmax options. Look at the examples in the
other examples section of the online
manual.
There are chip gaps in my input spectrum. Can I
mask out specific wavelength intervals?
Yes, using the
wmask option.
What does SNID stand for?
Super
nova
Identification. It
does
not stand for any of the following (found through
Google):
Scandinavian Network for Infectious Diseases
Smart Network Interface Device
Studies in National and International Development
Subscriber Network Interface Device
Sud Nivernais Imphy Decize
Last updated on: 25 September 2007