Mercurial > repos > astroteam > hess_astro_tool
view hess_astro_tool.xml @ 1:593c4b45eda5 draft default tip
planemo upload for repository https://github.com/esg-epfl-apc/tools-astro/tree/main/tools commit 2f23ec010eab8d33d2760f061286756e17015af7
author | astroteam |
---|---|
date | Thu, 18 Apr 2024 09:26:15 +0000 |
parents | 02e4bb4fa10c |
children |
line wrap: on
line source
<tool id="hess_astro_tool" name="HESS" version="0.0.2+galaxy0" profile="23.0"> <requirements> <requirement type="package" version="8.22.2">ipython</requirement> <requirement type="package" version="5.3.4">astropy</requirement> <requirement type="package" version="1.11.4">scipy</requirement> <requirement type="package" version="1.10.14">pydantic</requirement> <requirement type="package" version="4.66.2">tqdm</requirement> <requirement type="package" version="1.1">gammapy</requirement> <requirement type="package" version="3.8.4">matplotlib</requirement> <requirement type="package" version="1.2.15">oda-api</requirement> <!--Requirements string 'nb2workflow[cwl,service,rdf,mmoda]>=1.3.30 ' can't be converted automatically. Please add the galaxy/conda requirement manually or modify the requirements file!--> <requirement type="package" version="7.16.3">nbconvert</requirement> <requirement type="package" version="1.21.4">wget</requirement> </requirements> <command detect_errors="exit_code">ipython '$__tool_directory__/${_data_product._selector}.py'</command> <configfiles> <inputs name="inputs" filename="inputs.json" data_style="paths" /> </configfiles> <inputs> <conditional name="_data_product"> <param name="_selector" type="select" label="Data Product"> <option value="Image" selected="true">Image</option> <option value="Spectrum" selected="false">Spectrum</option> <option value="Lightcurve" selected="false">Lightcurve</option> </param> <when value="Image"> <param name="src_name" type="text" value="Crab" label="src_name" /> <param name="RA" type="float" value="83.6287" label="RA (unit: deg)" /> <param name="DEC" type="float" value="22.0147" label="DEC (unit: deg)" /> <param name="T1" type="text" value="2000-10-09T13:16:00.0" label="T1" /> <param name="T2" type="text" value="2022-10-10T13:16:00.0" label="T2" /> <param name="Radius" type="float" value="1.0" label="Radius (unit: deg)" /> <param name="pixsize" type="float" value="0.05" label="Pixel size (unit: deg)" /> <param name="Emin" type="integer" value="1" label="Emin (unit: TeV)" /> <param name="Emax" type="float" value="100.0" label="Emax (unit: TeV)" /> </when> <when value="Spectrum"> <param name="src_name" type="text" value="PKS 2155-304" label="src_name" /> <param name="RA" type="float" value="329.716938" label="RA (unit: deg)" /> <param name="DEC" type="float" value="-30.225588" label="DEC (unit: deg)" /> <param name="T1" type="text" value="2000-10-09T13:16:00.0" label="T1" /> <param name="T2" type="text" value="2022-10-10T13:16:00.0" label="T2" /> <param name="Radius" type="float" value="2.5" label="Radius (unit: deg)" /> <param name="R_s" type="float" value="0.2" label="R_s (unit: deg)" /> <param name="Emin" type="float" value="0.1" label="Emin (unit: TeV)" /> <param name="Emax" type="float" value="100.0" label="Emax (unit: TeV)" /> <param name="NEbins" type="integer" value="30" label="NEbins" /> <param name="Efit_min" type="float" value="0.2" label="Efit_min (unit: TeV)" /> <param name="Efit_max" type="float" value="10.0" label="Efit_max (unit: TeV)" /> </when> <when value="Lightcurve"> <param name="src_name" type="text" value="Crab" label="src_name" /> <param name="RA" type="float" value="83.6287" label="RA (unit: deg)" /> <param name="DEC" type="float" value="22.0147" label="DEC (unit: deg)" /> <param name="T1" type="text" value="2004-11-20T13:16:00.0" label="T1" /> <param name="T2" type="text" value="2004-12-20T13:16:00.0" label="T2" /> <param name="Radius" type="float" value="2.5" label="Radius (unit: deg)" /> <param name="R_s" type="float" value="0.2" label="R_s (unit: deg)" /> <param name="Emin" type="integer" value="1" label="Emin (unit: TeV)" /> <param name="Emax" type="float" value="100.0" label="Emax (unit: TeV)" /> <param name="NTbins" type="integer" value="30" label="NTbins" /> </when> </conditional> </inputs> <outputs> <data label="${tool.name} -> Image png" name="out_Image_png" format="auto" from_work_dir="png_galaxy.output"> <filter>_data_product['_selector'] == 'Image'</filter> </data> <data label="${tool.name} -> Image fits" name="out_Image_fits" format="auto" from_work_dir="fits_galaxy.output"> <filter>_data_product['_selector'] == 'Image'</filter> </data> <data label="${tool.name} -> Spectrum png" name="out_Spectrum_png" format="auto" from_work_dir="png_galaxy.output"> <filter>_data_product['_selector'] == 'Spectrum'</filter> </data> <data label="${tool.name} -> Spectrum table_confidence_contour" name="out_Spectrum_table_confidence_contour" format="auto" from_work_dir="table_confidence_contour_galaxy.output"> <filter>_data_product['_selector'] == 'Spectrum'</filter> </data> <data label="${tool.name} -> Spectrum table_spectrum" name="out_Spectrum_table_spectrum" format="auto" from_work_dir="table_spectrum_galaxy.output"> <filter>_data_product['_selector'] == 'Spectrum'</filter> </data> <data label="${tool.name} -> Lightcurve png" name="out_Lightcurve_png" format="auto" from_work_dir="png_galaxy.output"> <filter>_data_product['_selector'] == 'Lightcurve'</filter> </data> <data label="${tool.name} -> Lightcurve table" name="out_Lightcurve_table" format="auto" from_work_dir="table_galaxy.output"> <filter>_data_product['_selector'] == 'Lightcurve'</filter> </data> </outputs> <tests> <test expect_num_outputs="2"> <conditional name="_data_product"> <param name="_selector" value="Image" /> <param name="src_name" value="Crab" /> <param name="RA" value="83.6287" /> <param name="DEC" value="22.0147" /> <param name="T1" value="2000-10-09T13:16:00.0" /> <param name="T2" value="2022-10-10T13:16:00.0" /> <param name="Radius" value="1.0" /> <param name="pixsize" value="0.05" /> <param name="Emin" value="1" /> <param name="Emax" value="100.0" /> </conditional> <assert_stdout> <has_text text="*** Job finished successfully ***" /> </assert_stdout> </test> <test expect_num_outputs="3"> <conditional name="_data_product"> <param name="_selector" value="Spectrum" /> <param name="src_name" value="PKS 2155-304" /> <param name="RA" value="329.716938" /> <param name="DEC" value="-30.225588" /> <param name="T1" value="2000-10-09T13:16:00.0" /> <param name="T2" value="2022-10-10T13:16:00.0" /> <param name="Radius" value="2.5" /> <param name="R_s" value="0.2" /> <param name="Emin" value="0.1" /> <param name="Emax" value="100.0" /> <param name="NEbins" value="30" /> <param name="Efit_min" value="0.2" /> <param name="Efit_max" value="10.0" /> </conditional> <assert_stdout> <has_text text="*** Job finished successfully ***" /> </assert_stdout> </test> <test expect_num_outputs="2"> <conditional name="_data_product"> <param name="_selector" value="Lightcurve" /> <param name="src_name" value="Crab" /> <param name="RA" value="83.6287" /> <param name="DEC" value="22.0147" /> <param name="T1" value="2004-11-20T13:16:00.0" /> <param name="T2" value="2004-12-20T13:16:00.0" /> <param name="Radius" value="2.5" /> <param name="R_s" value="0.2" /> <param name="Emin" value="1" /> <param name="Emax" value="100.0" /> <param name="NTbins" value="30" /> </conditional> <assert_stdout> <has_text text="*** Job finished successfully ***" /> </assert_stdout> </test> </tests> <help>This service provides analysis of publicly available sample “Data Level 3” (DL3) data of HESS gamma-ray telescope, described by `Hess Collaboration (2018) <https://arxiv.org/abs/1810.04516>`__. Three types of data products are generated: sky images, source lightcurves and spectra. The sky images are count maps produced by histogramming of the events in sky coordinates (Right Ascention and Declinaiton), in the energy range that can be set by adjusting the ``Emin`` and ``Emax`` parameters and in the time range that can be adjusted setting the ``T1`` (start time) and ``T2`` (stop time) parameters. For the spectra, the analysis performs histogramming of events in energy, in the number ``NEbins`` of energy bins homogeneously spaces in logarithm of energy, beterrn ``Emin`` and ``Emax``. Conversion of the counts to the physical flux units is done by dividing by the exposure time and effective area that is extracted from the Instrument Response Functions (IRF). The result is shown with black data points. This simple estimate of flux in energy bins does not take into account the event energy estimation errors. The source signal is extracted from a circular region of the radius ``R_s``\ (adjustable parameter) around the source posiiton. The background estimate is done using the “wobble” method, from a position opposite with respect to the signal extraction region in the camera, with respect to the center of the telescope field-of-view. A powerlaw fit to the spectrum is done using forward folding method, properly taking into account the error of energy estimation. The results of the spectral fitting include the 68% confidence contour for the spectral parameters (slope and normalisaiton of the powerlaw spectrum). The first entry in the “contour” table is the best-fit value of the fit. The energy range of fitting can be adjusted with the ``Efit_min``, ``Efit_max`` parameters. The lightcurves are produced by hystrogramming of the events in time, in the number ``NTbins`` of time intervals of equalt time width between ``T1`` (start time) and ``T2`` (stop time). The events are selected in a desired energy range between ``Emin`` and ``Emax``. The source and backgorund counts are computed in the same way as for the spectral fitting. Conversion of the counts to the physical flux units is done by dividing by the exposure time and effective area that is extracted from the IRF. </help> <citations> <citation type="doi">10.5281/zenodo.1421098</citation> </citations> </tool>