2014-07-23T12:00:00Z
100
SP_ACE spectral analysis tool
SP_ACE computes stellar parameters (gravity, temperature) and element
abundances from optical stellar spectra (`sample spectrum`_). It employs
1D stellar atmosphere models in Local Thermodynamic Equilibrium (LTE).
The present service does not offer all the options available for SP_Ace
as documented in `the tutorial`_. All options are available if running
SP_Ace locally (cf. `download page`_).
This service exposes an updated version containing some bug fixes with
respect to the one described in the paper.
.. _the tutorial: \getConfig{web}{serverURL}/sp_ace/q/dist/static/tutorial.pdf
.. _download page: \getConfig{web}{serverURL}/sp_ace/q/dist/static
.. _sample spectrum: \getConfig{web}{serverURL}/\rdId/c/static/fast_spectrum.txt
Boeche, C.; Demleitner, M.; Heinl, H.
2016A&A...587A...2B
stellar-abundances
spectroscopy
stellar-atmospheres
astronomy-data-analysis
Updated fitting code to new upstream version.
Updated fitting code to new upstream version fixing a bug in the
S/N estimation.
Updated fitting code to upstream version 1.1; normalisation should
now be more stable.
Updated fitting code to upstream version 1.2. See the tutorial
for a list of changes.
Updated fitting code to upstream version 1.3, which includes
a new parameter rv_ini. See the tutorial for a list of additional
changes.
Updated fitting code to upstream version 1.3.1; this just fixes a few
bugs.
Updated fitting code to upstream version 1.4. That's a fairly major
step; for instance, the spectral range used for fitting is now
only 4800 and 6860 Å.
If you use results obtained by this service, please cite the original
publication (see source meta) and acknowlege: This work has made
use of the sp_ace spectral analysis tool version 1.4.
`_ except
for the upload modalities. A parameter definition in a machine-readable
VOTable is produced by the service itself at
\getConfig{web}{serverURL}/sp_ace/q/c/api?MAXREC=0
To run the program offline, please refer to our
`download page <\getConfig{web}{serverURL}/sp_ace/q/dist>`_
To run it, upload your radial-velocity-corrected
continuum-normalised (!) spectrum (example_) giving
wavelengths in Angstrom vs. flux. Spectra of resolutions outside of
the 2000 .. 20000 range will probably not yield reliable results.
Using curl, this would look like this::
curl -FUPLOAD=spectrum,param:up -Fup=@zw.asc\\
\getConfig{web}{serverURL}/sp_ace/q/c/api
Alternative functions or programs may, of course, be used as well.
Further parameters would just add more -F options (but take care to
use proper shell quoting).
This will give you VOTables, which are nice if the result is going to be
processed with TOPCAT or astropy or similar. To get CSV, add a
RESPONSEFORMAT parameter::
curl -FUPLOAD=spectrum,param:up -Fup=@zw.asc\\
-FRESPONSEFORMAT=csv\\
\getConfig{web}{serverURL}/sp_ace/q/c/api
For convenient processing of multiple spectra, we recommend using
Python with astropy and the `requests package`_. The following code
will print the abundances and global parameters for a spectrum
in ``tmp/space/fast_spectrum.txt``::
from cStringIO import StringIO
from astropy.io.votable import parse_single_table
import requests
r = requests.post("http://dc.g-vo.org/sp_ace/q/c/api",
data = {
"UPLOAD": "spectrum,param:file",
"compute_errors": "False"},
files = {
"file": open("tmp/space/fast_spectrum.txt")})
t = parse_single_table(StringIO(r.content))
print t.array
for p in t.params:
print p.name, p.value
If you get messages about bad units, don't worry. By VOUnit_, Astropy's
wrong and we are right.
An additional hint: If you don't absolutely need the errors, don't make
sp_ace compute them -- it's much faster without them, so that's the
default. If you need errors, pass -Fcompute_errors=True.
.. _requests package: https://pypi.python.org/pypi/requests/2.4.1
.. _VOUnit: http://ivoa.net/documents/VOUnits
.. _example: \getConfig{web}{serverURL}/\rdId/c/static/fast_spectrum.txt
]]>
A param with a confidence interval (give name, ucd, unit, tablehead
and description and get three params including asymmetric error
bars.
Element abundances derived from the spectrum.
The possible values of the convergence flag are:
=== =========================================================================================
0 SP Ace successfully converged
1 normalization loop did not converge within 30 loops
2 stellar parameters out of the limits covered by the GCOG library
3 FWHM does not converge
4 RV too far from zero (beyond 1FWHM in wavelength)
5 improper input parameters in minimization routine lmdif1
6 TGM minimization routine exceeded the maximum number of iterations
7 ABD minimization routine exceeded the maximum number of iterations
8 TGM outer loop did not converge
9 SP Ace cannot open the spectrum (maybe wrong name or address?)
10 SP Ace cannot open the GCOG library (maybe wrong name or address?)
11 SP Ace cannot open the space 6degpoly.dat file (maybe wrong address of the GCOG library?)
=== =========================================================================================
The model spectrum as computed by SP_Ace;
all fluxes are continuum-normalized.
spec:Spectrum
gavo@ari.uni-heidelberg.de
NORMALIZED
SP_ACE software distribution
data
res/download.shtml
test_data
res/form.html
sp_ace
# requires the result table in tag.slotData
convFlag = tag.slotData.getParam("conv")
if convFlag==0:
return ctx.tag["Converged normally"]
else:
return ctx.tag(style="padding:3pt;background-color:#ffaaaa;"
"display:inline-block")[
T.strong[{
0: "SP Ace successfully converged",
1: "Normalization loop did not converge within 30 loops",
2: "Stellar parameters out of the limits covered by"
" the GCOG library",
3: "FWHM does not converge",
4: "RV too far from zero (beyond 1FWHM in wavelength)",
5: "improper input parameters in minimization routine lmdif1",
6: "TGM minimization routine exceeded the maximum number"
" of iterations",
7: "ABD minimization routine exceeded the maximum number of"
"iterations",
8: "TGM outer loop did not converge",
9: "SP Ace cannot open the spectrum (maybe wrong"
" name or address?)",
10: "SP Ace cannot open the GCOG library (maybe wrong "
"name or address?)",
11: "SP Ace cannot open the space 6degpoly.dat file (maybe"
" wrong address of the GCOG library?)"}.get(convFlag,
"Unknown disaster. Please report.")]]
This is not a spectrum. Please just test.
c/form
self.assertHasStrings(
"5662.0",
"5827.0",
"[El/H]",
"-0.73", "-0.81", "-0.65", "415",
"Result Spectrum</h3>",
"4800.35", "0.924")
foo bar
bad input
c/api
self.assertHasStrings("<VOTABLE", 'value="ERROR"',
"Field spectrum: Computation failed: No readable spectrum or"
" wrong wave_lims")
c/api
',
'value="5590.0"',
'unit="K"')
row = self.getFirstVOTableRow(rejectExtras=False)
self.assertEqual(row["element"], "Fe")
self.assertAlmostEqual(row["ab"], -0.75)
self.assertEqual(row["nlines"], 41)
# now see if there's the table with the result spectrum in there
self.assertHasStrings('5208.8')
]]>
c/form
1.15", # FWHM
"-0.13 | " # Al abundance
)
]]>