Commit 8ccaba30 authored by Danny Boxhoorn's avatar Danny Boxhoorn

Merge branch 'tnutma/feature/autotools' into 'master'

Migrate installation to autotools

See merge request !2
parents 2cb86467 25dd63dd
......@@ -8,3 +8,6 @@ indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[Makefile.*]
indent_style = tab
# Autotools
autom4te.cache
Makefile.in
/aclocal.m4
/config.log
/install-sh
/configure
/depcomp
/missing
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
......
## Installation
Checkout the source from git or unzip the tarball, then run:
```
./autogen.sh
./configure [--prefix=$PREFIX]
make
make check
make install
```
The first line is only required when compiling from a git clone, and needs both
autoconf and automake to be installed.
SUBDIRS = code test
# photz
Photometric redshift code and spectral energy distribution (SED) models.
Determines redshift- and type-probabilities for photometric data by fit with
redshifted eigenspectra, and calculates filter fluxes from SEDs.
## References
- Gabasch, A., Bender, R., Seitz, S., et al. 2004, A&A, 421, 41.
([ADS](https://ui.adsabs.harvard.edu/abs/2004A&A...421...41G/abstract))
- Bender R., Appenzeller I., B̈ohm A., et al. 2001,
in Cristiani S., Renzini A., Williams R. E., eds, p. 96.
([ADS](https://ui.adsabs.harvard.edu/abs/2001defi.conf...96B/abstract))
## Usage
photz is not be to used on its own. Instead, it should always be invoked
via the Python classes `PhotRedCatalog` and `PhotRedConfig` in Astro-WISE.
# PHOTOMETRIC REDSHIFT
Code and SED models.
References:
- https://ui.adsabs.harvard.edu/abs/2001defi.conf...96B/abstract
- https://ui.adsabs.harvard.edu/abs/2004A&A...421...41G/abstract
#!/bin/sh
# Regenerate the configure script.
autoreconf --force --install
CC=g77
all: sedfilter photoz
sedfilter: sedfilter.for
$(CC) -o sedfilter.exe sedfilter.for
photoz: photoz.for
$(CC) -o photoz.exe photoz.for
clean:
rm sedfilter.exe photoz.exe
bin_PROGRAMS = photoz.exe sedfilter.exe
photoz_exe_SOURCES = photoz.for
sedfilter_exe_SOURCES = sedfilter.for
PHOTOMETRIC REDSHIFT CODE
To compile the two programs:
g77 -o photoz photoz.for
g77 -o sedfilter sedfilter.for
And copy the resulting binaries then into an appropriate bin directory
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -181,7 +181,7 @@ C
> 'band for the lum.func (U,B,V...= 1,2,3..., 0=lum.ignored).'
WRITE(18,'(A1,1X,A58)') '#',
> 'The next line is the path to the model directory. ********'
WRITE(18,*) '../sed/'
WRITE(18,*) './'
WRITE(18,*) 'eigenspectra.'//OEXT(1:16)
WRITE(18,'(6X,I4,G10.2)') 0
WRITE(18,*) 'zeropoints.'//OEXT(1:16)
......@@ -1052,7 +1052,7 @@ C
Z(IP)=0.
23 CONTINUE
24 CONTINUE
PAUSE '50 iterations should never happen'
C PAUSE '50 iterations should never happen'
RETURN
END
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
......@@ -1228,7 +1228,7 @@ C
S(J+1)=S(J)
H(J+1)=0.25*H(J)
11 CONTINUE
PAUSE 'Too many steps.'
C PAUSE 'Too many steps.'
END
c
c*******************************************************************
......@@ -1255,7 +1255,7 @@ c
HP=XA(I+M)-X
W=C(I+1)-D(I)
DEN=HO-HP
IF(DEN.EQ.0.)PAUSE
C IF(DEN.EQ.0.)PAUSE
DEN=W/DEN
D(I)=HP*DEN
C(I)=HO*DEN
......
AC_INIT(photz, 1.1.0)
AM_INIT_AUTOMAKE([foreign])
AC_LANG([Fortran 77])
AC_PROG_F77
AC_CONFIG_FILES([Makefile code/Makefile test/Makefile])
AC_OUTPUT
TESTS = test_sedfilter.sh test_photz.sh
photoz_models.colocam
photoz.dat
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
mock.cat
0 1 9000 0 0 0 0 1 0.05
burst1_ccn.sed
3 5000 1 2
*
colocam
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
#!/bin/sh
# Fail fast and enable debugging.
set -e
set -x
# Run photoz command.
../code/photoz.exe < photz.in
# Test if the above command produced some of the expected output.
test -f photoz.datpz1
test -f photoz.datstar
#!/bin/sh
# Fail fast and enable debugging.
set -e
set -x
# Set up environment.
cp ../sed/A0V_KUR.SED .
cp ../sed/burst1_ccn.sed .
# Run the sedfilter command.
../code/sedfilter.exe < sedfilter.in
# Test if the above command produced some of the expected output.
test -f photoz_models.colocam
test -f burst1_ccn.colocam
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment