0
I Use This!
Activity Not Available

Project Summary

GALMORPHgalaxy morphology model-fitting code

DescriptionComing soon with references, etc.

See "Wiki" and "Source" tabs for description and source code.

InstallationExternal Packages:

GALMORPH uses the following included packages:

ASA - Adaptive Simulated Annealing http://alumnus.caltech.edu/~ingber/#ASA
LevMar - Levenberg Marquardt. http://www.ics.forth.gr/~lourakis/levmar/
TMV - Template Matrix Vector for C++ http://sourceforge.net/projects/tmv-cpp/
cfitsio - Fits file I/O library http://heasarc.gsfc.nasa.gov/fitsio/

GALMORPH uses the following non-included packages which need to be installed separately:

Sextractor - Astronomical Source Extractor http://terapix.iap.fr/rubrique.php?id_rubrique=91/
fftw3 - Fourier Transform Library http://www.fftw.org/
These are both included in scisoft: http://www.eso.org/sci/data-processing/software/scisoft/
http://web.mac.com/npirzkal/Scisoft/Scisoft.html

GALMORPH recommends using (but you could compile without) these linear algebra packages:

LAPACK/BLAS. These are optional via makefile options. The default is to use them though.

Thanks to the authors of these great libraries! Please see LICENSE.txt for license information.

Using The MakefileYou will probably need to open "Makefile" and edit: FFTW_INCLUDE and FFTW_LIB to point to your installation of FFTW.

Then type: $ make and it should compile all necessary libraries.

Note that the makefile calls makefiles in subdirectories cfitsio and tmv0.61, so if you are getting errors related to those libraries, it may be necessary to descend into them and look at their makefiles and documentation for help. (see links above).

The other libraries, asa and levmar are compiled from the GALMORPH makefile directly, so you don't need to edit or use their makefiles.

Running GALMORPHExamples:

I. Subtract Background from a frame containing many galaxies. (Tailored to SDSS corrected frames .fpC).

Make the program: $ Make background_main $ ./GALMORPH_estimate_background input_frame.fits MODE mean_sky_val.txt subtracted_frame.fits sky_map.fits Inputs:

a) input_frame.fits is a fits file with the original frame b) MODE is a string specifying the mode: STEP- subtract a smoothly varying sky along the rows, and a step function along the columns. This models sky effects in drift-scan SDSS images, which have a possible amp-jump between the left and right halves of the image.
TWODIM - subtract a smoothly varying 2d sky.
CONSTANT - subtract a constant sky.
c) mean_sky_val.txt is a filename specifying a text file which will contain the mean sky_value and an estimate of the uncertainty on the sky_value. d) subtracted_frame.fits is a filename specifying the output for a background subtracted image. e) sky_map.fits is the map of the background which has been subtracted. If you desire to omit one of the output files (c,d, or e), specify NULL.

II. Get mask and create postage stamp from a (already background subtracted) frame. Make the program: $ Make mask_main $./GALMORPH_get_mask subtracted_frame.fits MEAN_SKY_VAL rowctr colctr stamp_image.fits stamp_mask.fits Inputs:

a) subtracted_frame.fits is a fits file containing the background subtracted frame. e.g. the output from GALMORPH_estimate_background b) MEAN_SKY_VAL is a double containing the mean sky level which was subtracted. This is used to cutoff the postage stamp image at 1% of the sky level. It is output by GALMORPH_estimage_background in mean_sky_val.txt c) rowctr is the center coordinate of the galaxy of interest in the row dimension. double. d) colctr is the center coordinate of the galaxy of interest in the column dimension. double. e) stamp_image.fits is the output filename for a postage stamp cutout of the galaxy of interest f) stamp_mask.fits is the output filename for a postage stamp cutout of mask of the galaxy of interest. A value of 1 means the pixel is to be considered. A value of 0 means the pixel should be ignored because it belongs to another source. If you desire to omit one of the output files (e or f), specify NULL.

III. Fit a model to a sky_subtracted postage-stamp image with or with or without a mask. ./GALMORPH_fit_model parameter_input.txt psf.fits stamp_image.fits stamp_mask.fits stamp_sigmas.fits parameter_output.txt chi2_output.txt image_output.fits residual_output.fits Inputs:

a) parameter_input.txt. - A parameter file specifying start, lower_bound, and upper_bound for each of the 11 parameters. See input_files/input.txt for examples for DeVaucouleurs, Sersic, Exponential, DeVaucouleurs+Exponential, and Sersic+Exponential model fitting. If lower_bound == upper_bound for a parameter, that parameter will be fixed to that value. If 'n' is specified, defaults will be chosen for start, lower_bound, and upper_bound. These are chosen in a appropriate way, e.g. image moments are used to estimate starting radii and ellipticities. b) psf.fits - A fits file giving the psf to be used. c) stamp_image.fits - A fits file image of the galaxy which is being fit. d) stamp_mask.fits - A optional mask file, the same size as stamp_image.fits. If a pixel has value of 1, it will be considered, if it has 0 it will not, otherwise an error occurs. e) stamp_sigmas.fits - An optional uncertainty file. The calculation of chi-squared will use sigma for each pixel, assuming the pixel follows a gaussian error distribution with sigma. Because of possible systematic uncertainties in sky-subtraction, it is recommended to not use sigmas, and give each pixel equal weight. In that case specify NULL for this filename. f) parameter_output.txt - An output file giving the values for the 11 parameters in the fit. g) chi2_output.txt - An output file giving chi2 and chi2 per degree of freedom for the fit. h) image_output.fits - A fits file giving the best-fiting image. i) residual_output.fits - A fits file giving stamp_image.fits - image_output.fits To omit an output file, or not use a mask or sigmas file, specify NULL for (d,e,f,g,h, or i).

IV. Does everything that GALMORPH_estimate_background, GALMORPH_get_mask, and GALMORPH_fit_model do (NO sigmas option). ./GALMORPH_background_mask_fit input_frame.fits MODE rowctr colctr parameter_input.txt psf.fits mean_sky_val.txt subtracted_frame.fits sky_map.fits stamp_image.fits stamp_mask.fits parameter_output.txt chi2_output.txt image_output.fits residual_output.fits INPUTS:

a) input_frame.fits is a fits file with the original frame b) MODE is a string specifying the mode: STEP- subtract a smoothly varying sky along the rows, and a step function along the columns. This models sky effects in drift-scan SDSS images, which have a possible amp-jump between the left and right halves of the image.
TWODIM - subtract a smoothly varying 2d sky.
CONSTANT - subtract a constant sky.
c) rowctr is the center coordinate of the galaxy of interest in the row dimension. double. d) colctr is the center coordinate of the galaxy of interest in the column dimension. double. e) parameter_input.txt. - A parameter file specifying start, lower_bound, and upper_bound for each of the 11 parameters. See input_files/input.txt for examples for DeVaucouleurs, Sersic, Exponential, DeVaucouleurs+Exponential, and Sersic+Exponential model fitting. If lower_bound == upper_bound for a parameter, that parameter will be fixed to that value. If 'n' is specified, defaults will be chosen for start, lower_bound, and upper_bound. These are chosen in a appropriate way, e.g. image moments are used to estimate starting radii and ellipticities. f) psf.fits - A fits file giving the psf to be used. g) mean_sky_val.txt is a filename specifying a text file which will contain the mean sky_value and an estimate of the uncertainty on the sky_value. h) subtracted_frame.fits is a filename specifying the output for a background subtracted image. i) sky_map.fits is the map of the background which has been subtracted. j) stamp_image.fits is the output filename for a postage stamp cutout of the galaxy of interest k) stamp_mask.fits is the output filename for a postage stamp cutout of mask of the galaxy of interest. A value of 1 means the pixel is to be considered. A value of 0 means the pixel should be ignored because it belongs to another source. l) parameter_output.txt - An output file giving the values for the 11 parameters in the fit. m) chi2_output.txt - An output file giving chi2 and chi2 per degree of freedom for the fit. n) image_output.fits - A fits file giving the best-fiting image. o) residual_output.fits - A fits file giving stamp_image.fits - image_output.fits If you desire to omit one of the output files (g - o), specify NULL.

Tags

No tags have been added

In a Nutshell, galmorph...

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

GNU General Public License v3.0 or later
Permitted

Place Warranty

Use Patent Claims

Commercial Use

Modify

Distribute

Forbidden

Sub-License

Hold Liable

Required

Distribute Original

Disclose Source

Include Copyright

State Changes

Include License

Include Install Instructions

These details are provided for information only. No information here is legal advice and should not be used as such.

All Licenses

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    data presented on the Open Hub is available through our API
  • ...
    nearly 1 in 3 companies have no process for identifying, tracking, or remediating known open source vulnerabilities
  • ...
    you can subscribe to e-mail newsletters to receive update from the Open Hub blog

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

Community Rating

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!
Sample ohloh analysis