Skip to content

Commit

Permalink
New version (1.2.0), see ChangeLog
Browse files Browse the repository at this point in the history
  • Loading branch information
gcalderone committed Jul 19, 2017
1 parent 266d65c commit 9eaee84
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 24 deletions.
29 changes: 28 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
- Jul 19, 2017 (ver. 1.2)

+ QSFit now defines a global variable upon initialization, named
`!QSFIT_OPT`, containing several settings to customize the fitting
behavior. Check the qsfit_prepare_options for further details;

+ The default host galaxy template is now SWIRE_ELL5
(http://www.iasf-milano.inaf.it/~polletta/templates/swire_templates.html);

+ By default, the continuum is now modeled with a single power law
instead of a smoothly broken power law. To restore the old
behaviour set `continuum.dalpha.fixed = 0`;

+ The four parts of the UV iron template are now joined in a
single component;

+ QSFit now estimates the equivalent widths for the iron and
emission line components;

+ A Monte Carlo resampling method has been implemented to
accurately estimate the parameter uncertainties. See the
corresponding section in the reference paper;

+ A new component to model the Balmer continuum and
pseudo-continuum (blending of high order Balmer lines) has been
added.


- May 29, 2017 (ver. 1.1)
Minor updates to improve performances, accuracy of results and
functionalities:
Expand All @@ -16,6 +44,5 @@
+ Default gnuplot terminal is qt (in ver. 1.0 was wxt);



- Dec. 5, 2016 (ver. 1.0)
First commit of QSFit package
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@

**QSFit** (Quasar Spectral Fitting) is a software package written in
IDL to automatically perform the analysis of Active Galactic Nuclei
(AGN) optical spectra. The software provides estimates of: AGN
continuum luminosities and slopes at several restframe wavelengths;
luminosities, widths and velocity offsets of 20 emission lines
(Halpha, Hbeta, Mgii, [Oiii], Civ, etc.); luminosities of iron blended
lines at optical and UV wavelengths; host galaxy luminosities at 5500A
(for sources with z . 0.8). The ultimate purpose of **QSFit** is to
allow astronomers to run standardized recipes to analyze the AGN data,
in a simple, replicable and shareable way. The whole fitting process
is customizable for specific needs, and can be extended to analyze
spectra from other data sources.
(AGN) optical spectra. The software provides luminosity estimates for
the AGN continuum, the Balmer continuum, both optical and UV iron
blended complex, host galaxy and emission lines, as well as width,
velocity offset and equivalent width of 20 emission lines (Halpha,
Hbeta, Mgii, [Oiii], Civ, etc.). The ultimate purpose of **QSFit** is
to allow astronomers to run standardized recipes to analyze the AGN
data, in a simple, replicable and shareable way. The whole fitting
process is customizable for specific needs, and can be extended to
analyze spectra from other data sources.

The main website is: [http://qsfit.inaf.it](http://qsfit.inaf.it).

Expand Down
57 changes: 44 additions & 13 deletions USAGE
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ To use QSFit you should have IDL (ver >= 8.1) and Gnuplot (ver. >=5.0)
installed.

Start an IDL session and change to the directory where you stored the
QSFit files, e.g.,
QSFit files, e.g.:

IDL> CD, 'C:\the\path\where\qsfit\code\is\located' (on windows)
IDL> CD, 'C:\the\path\where\qsfit\code\is\located' (on windows)

or

IDL> CD, '/the/path/where/qsfit/code/is/located' (on Linux)
IDL> CD, '/the/path/where/qsfit/code/is/located' (on Linux)


______________________________________________________________________
Compile the QSFit procedures and dependencies
IDL> compile
Compile the QSFit procedures and dependencies:
IDL> compile

The "compile" procedure and QSFit routines can not be used within the
same procedure. Best practice is to call "compile" manually, at the
Expand Down Expand Up @@ -48,9 +48,9 @@ directory. This can be used to quickly test the QSFit procedures (see
below).

______________________________________________________________________
Run the analysis for a specific source.
Run the analysis for a specific source:

IDL> res = qsfit('data/spec-0752-52251-0323.fits', z=0.3806, ebv=0.06846)
IDL> res = qsfit('data/spec-0752-52251-0323.fits', z=0.3806, ebv=0.06846)

Parameters are:
- the path to a SDSS-DR10 FITS file
Expand All @@ -64,7 +64,7 @@ ______________________________________________________________________
If you want the results to be saved in a directory (which must have
been previously created) use the OUTDIR keyword, e.g.

IDL> res = qsfit('data/spec-0752-52251-0323.fits', z=0.3806, ebv=0.06846, outdir='output')
IDL> res = qsfit('data/spec-0752-52251-0323.fits', z=0.3806, ebv=0.06846, outdir='output')

This will save all the logs in a file named
output/spec-0752-52251-0323.log and the results in
Expand All @@ -82,16 +82,16 @@ re-run the analysis you should manually delete that file.

______________________________________________________________________
Plot the results:
IDL> qsfit_plot, res
IDL> qsfit_plot, res

To plot the data rebinned by a factor of 5:
IDL> res.gfit.plot.(0).main.rebin = 5
IDL> qsfit_plot, res
IDL> res.gfit.plot.(0).main.rebin = 5
IDL> qsfit_plot, res


______________________________________________________________________
To save the gnuplot files in a specific path
IDL> qsfit_plot, res, filename='output/spec-0752-52251-0323'
To save the gnuplot files in a specific path:
IDL> qsfit_plot, res, filename='output/spec-0752-52251-0323'

Note that the directory "output" must have been previously created and
that the file name must not have any extension. Two files will be
Expand All @@ -118,3 +118,34 @@ with
set output 'filename.pdf'

and reload the file in gnuplot.


______________________________________________________________________
Monte Carlo resampling:

To run the Monte Carlo reampling method (see corresponding section in
the reference paper) simply add the RESAMPLE= keyword in the qsfit
call, e.g.:

IDL> res = qsfit('data/spec-0752-52251-0323.fits', z=0.3806, ebv=0.06846, resample=1000)

The result variable will be an array of 1000 elements (or whatver
number you set with the RESAMPLE keyword) where the first is the
actual analysis on the real data, while the remaining ones will be the
analysis on the mock data generated from the best fit model of the
actual analysis.


______________________________________________________________________
QSFit Customization:

Some details of QSFit behavior can be customized through the
!QSFIT_OPT global variable. Check the qsfit_prepare_options
procedure for a list of default values and their meaning.

For instance, to enable/disable the Balmer continuum component set
`!qsfit_opt.balmer` to 1/0 respcetively.

Further customization can be performed by modifying the source code in
qsfit.pro. Check the documentation in the reference paper and in the
code itself.

0 comments on commit 9eaee84

Please sign in to comment.