Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

New formula: SNID 5.0 #10273

Closed
wants to merge 1 commit into from

2 participants

@RuiPereira

A Supernova Identification package, originally
written by John Tonry to determine redshifts of
Type Ia supernovae. It has since been re-written
and expanded to include type and age determination,
as well as an interactive plotting package.

Depends on pgplot from #10272

@RuiPereira RuiPereira New formula: SNID 5.0
A Supernova Identification package, originally 
written by John Tonry to determine redshifts of 
Type Ia supernovae. It has since been re-written 
and expanded to include type and age determination,
as well as an interactive plotting package.
685b82a
@adamv
Owner

What is the source of the patch, and has it been submitted upstream?

@RuiPereira

The patch is my own and is just to prevent SNID to recompile libbutton by itself. However SNID has some issues with the current homebrew gfortran, so I'm closing this pull request for now.

@RuiPereira RuiPereira closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 17, 2012
  1. @RuiPereira

    New formula: SNID 5.0

    RuiPereira authored
    A Supernova Identification package, originally 
    written by John Tonry to determine redshifts of 
    Type Ia supernovae. It has since been re-written 
    and expanded to include type and age determination,
    as well as an interactive plotting package.
This page is out of date. Refresh to see the latest.
Showing with 52 additions and 0 deletions.
  1. +52 −0 Library/Formula/snid.rb
View
52 Library/Formula/snid.rb
@@ -0,0 +1,52 @@
+require 'formula'
+
+class Snid < Formula
+ url 'http://marwww.in2p3.fr/~blondin/software/snid/snid-5.0.tar.gz'
+ homepage 'http://marwww.in2p3.fr/~blondin/software/snid/'
+ md5 'aefed2e2cbd5b26fd1f0171bbb7b6092'
+
+ depends_on 'pgplot'
+
+ def patches () DATA end
+
+ def install
+ ENV.fortran
+ ENV.x11
+ # where to store spectral templates
+ inreplace 'source/snidmore.f', 'INSTALL_DIR/snid-5.0', prefix
+ ENV.append 'FFLAGS', '-O -fno-automatic'
+ ENV['PGLIBS'] = "-Wl,-framework -Wl,Foundation -L#{HOMEBREW_PREFIX}/lib -lpgplot"
+ system "make"
+ bin.install 'snid', 'logwave', 'plotlnw'
+ prefix.install Dir['templates']
+ prefix.install Dir['test']
+ doc.install Dir['doc/*']
+ end
+
+ def test
+ mktemp do
+ system "snid wmin=4300 wmax=8900 #{prefix}/test/sn2003jo.dat"
+ end
+
+ end
+end
+
+__END__
+diff --git a/Makefile b/Makefile
+index 23a9864..ded9835 100644
+--- a/Makefile
++++ b/Makefile
+@@ -167,12 +167,11 @@ OUTILS2= utils/lnb.o utils/median.o
+ OUTILS3= utils/four2.o utils/lnb.o
+
+ # Button library
+-BUTTLIB= button/libbutton.a
++BUTTLIB= -lbutton
+
+ all : snid logwave plotlnw
+
+ snid : $(OBJ1) $(OUTILS1)
+- cd button && $(MAKE) FC=$(FC)
+ $(FC) $(FFLAGS) $(OBJ1) $(OUTILS1) $(XLIBS) $(BUTTLIB) $(PGLIBS) -o $@
+
+ logwave : $(OBJ2) $(OUTILS2)
Something went wrong with that request. Please try again.