comparison cta_astro_tool.xml @ 0:2f3e314c3dfa draft default tip

planemo upload for repository https://github.com/esg-epfl-apc/tools-astro/tree/main/tools commit 4543470805fc78f6cf2604b9d55beb6f06359995
author astroteam
date Fri, 19 Apr 2024 10:06:21 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:2f3e314c3dfa
1 <tool id="cta_astro_tool" name="CTA" version="0.0.1+galaxy0" profile="23.0">
2 <requirements>
3 <requirement type="package" version="6.0">unzip</requirement>
4 <requirement type="package" version="2.31.0">requests</requirement>
5 <requirement type="package" version="1.2">gammapy</requirement>
6 <requirement type="package" version="5.3">astropy</requirement>
7 <requirement type="package" version="3.8.4">matplotlib</requirement>
8 <requirement type="package" version="1.11.4">scipy</requirement>
9 <requirement type="package" version="1.2.15">oda-api</requirement>
10 <requirement type="package" version="8.22.2">ipython</requirement>
11 <!--Requirements string 'nb2workflow[cwl,service,rdf,mmoda]>=1.3.30
12 ' can't be converted automatically. Please add the galaxy/conda requirement manually or modify the requirements file!-->
13 <requirement type="package" version="7.16.3">nbconvert</requirement>
14 </requirements>
15 <command detect_errors="exit_code">ipython '$__tool_directory__/${_data_product._selector}.py'</command>
16 <configfiles>
17 <inputs name="inputs" filename="inputs.json" data_style="paths" />
18 </configfiles>
19 <inputs>
20 <conditional name="_data_product">
21 <param name="_selector" type="select" label="Data Product">
22 <option value="pre-defined_model" selected="true">pre-defined_model</option>
23 <option value="model_cube_file" selected="false">model_cube_file</option>
24 </param>
25 <when value="pre-defined_model">
26 <param name="RA" type="float" value="166.113809" label="RA (unit: deg)" />
27 <param name="DEC" type="float" value="38.208833" label="DEC (unit: deg)" />
28 <param name="OffAxis_angle" type="float" value="0.78" label="OffAxis_angle (unit: deg)" />
29 <param name="Texp" type="float" value="1.0" label="Texp (unit: hour)" />
30 <param name="z" type="float" value="0.03" label="z" />
31 <param name="F0" type="float" value="1e-11" label="F0" />
32 <param name="E0" type="float" value="1.0" label="E0 (unit: TeV)" />
33 <param name="Gamma" type="float" value="2.0" label="Gamma" />
34 <param name="Radius_spectal_extraction" type="float" value="0.2" label="Radius_spectal_extraction" />
35 <param name="Radius_sky_image" type="float" value="2.5" label="Radius_sky_image (unit: deg)" />
36 <param name="Site" type="select" label="Site">
37 <option value="North" selected="true">North</option>
38 <option value="South">South</option>
39 </param>
40 <param name="Telescope_LST" type="boolean" checked="true" label="Telescope_LST" />
41 <param name="Telescope_MST" type="boolean" checked="true" label="Telescope_MST" />
42 <param name="Telescope_SST" type="boolean" label="Telescope_SST" />
43 </when>
44 <when value="model_cube_file">
45 <param name="data_cube" type="data" label="data_cube" format="data" />
46 <param name="F0" type="float" value="1e-11" label="F0" />
47 <param name="E0" type="float" value="1.0" label="E0 (unit: TeV)" />
48 <param name="OffAxis_angle" type="float" value="0.4" label="OffAxis_angle (unit: deg)" />
49 <param name="Radius_spectal_extraction" type="float" value="0.2" label="Radius_spectal_extraction (unit: deg)" />
50 <param name="Radius_sky_image" type="float" value="2.5" label="Radius_sky_image (unit: deg)" />
51 <param name="Site" type="select" label="Site">
52 <option value="North" selected="true">North</option>
53 <option value="South">South</option>
54 </param>
55 <param name="Telescopes_LST" type="boolean" checked="true" label="Telescopes_LST" />
56 <param name="Telescopes_MST" type="boolean" checked="true" label="Telescopes_MST" />
57 <param name="Telescopes_SST" type="boolean" label="Telescopes_SST" />
58 <param name="Texp" type="float" value="1.0" label="Texp (unit: hour)" />
59 </when>
60 </conditional>
61 </inputs>
62 <outputs>
63 <data label="${tool.name} -&gt; pre-defined_model image_png" name="out_pre_defined_model_image_png" format="auto" from_work_dir="image_png_galaxy.output">
64 <filter>_data_product['_selector'] == 'pre-defined_model'</filter>
65 </data>
66 <data label="${tool.name} -&gt; pre-defined_model theta2_png" name="out_pre_defined_model_theta2_png" format="auto" from_work_dir="theta2_png_galaxy.output">
67 <filter>_data_product['_selector'] == 'pre-defined_model'</filter>
68 </data>
69 <data label="${tool.name} -&gt; pre-defined_model spectrum_png" name="out_pre_defined_model_spectrum_png" format="auto" from_work_dir="spectrum_png_galaxy.output">
70 <filter>_data_product['_selector'] == 'pre-defined_model'</filter>
71 </data>
72 <data label="${tool.name} -&gt; pre-defined_model event_list_fits" name="out_pre_defined_model_event_list_fits" format="auto" from_work_dir="event_list_fits_galaxy.output">
73 <filter>_data_product['_selector'] == 'pre-defined_model'</filter>
74 </data>
75 <data label="${tool.name} -&gt; model_cube_file spectrum_png" name="out_model_cube_file_spectrum_png" format="auto" from_work_dir="spectrum_png_galaxy.output">
76 <filter>_data_product['_selector'] == 'model_cube_file'</filter>
77 </data>
78 <data label="${tool.name} -&gt; model_cube_file theta2_png" name="out_model_cube_file_theta2_png" format="auto" from_work_dir="theta2_png_galaxy.output">
79 <filter>_data_product['_selector'] == 'model_cube_file'</filter>
80 </data>
81 <data label="${tool.name} -&gt; model_cube_file image_png" name="out_model_cube_file_image_png" format="auto" from_work_dir="image_png_galaxy.output">
82 <filter>_data_product['_selector'] == 'model_cube_file'</filter>
83 </data>
84 <data label="${tool.name} -&gt; model_cube_file event_list_fits" name="out_model_cube_file_event_list_fits" format="auto" from_work_dir="event_list_fits_galaxy.output">
85 <filter>_data_product['_selector'] == 'model_cube_file'</filter>
86 </data>
87 </outputs>
88 <tests>
89 <test expect_num_outputs="4">
90 <conditional name="_data_product">
91 <param name="_selector" value="pre-defined_model" />
92 <param name="RA" value="166.113809" />
93 <param name="DEC" value="38.208833" />
94 <param name="OffAxis_angle" value="0.78" />
95 <param name="Texp" value="1.0" />
96 <param name="z" value="0.03" />
97 <param name="F0" value="1e-11" />
98 <param name="E0" value="1.0" />
99 <param name="Gamma" value="2.0" />
100 <param name="Radius_spectal_extraction" value="0.2" />
101 <param name="Radius_sky_image" value="2.5" />
102 <param name="Site" value="North" />
103 <param name="Telescope_LST" value="True" />
104 <param name="Telescope_MST" value="True" />
105 <param name="Telescope_SST" value="False" />
106 </conditional>
107 <assert_stdout>
108 <has_text text="*** Job finished successfully ***" />
109 </assert_stdout>
110 </test>
111 <test expect_num_outputs="4">
112 <conditional name="_data_product">
113 <param name="_selector" value="model_cube_file" />
114 <param name="data_cube" location="https://gitlab.renkulab.io/astronomy/mmoda/cta/-/raw/b3f69b091ce942c05ad035220501ea078d54de26/3d.fits" />
115 <param name="F0" value="1e-11" />
116 <param name="E0" value="1.0" />
117 <param name="OffAxis_angle" value="0.4" />
118 <param name="Radius_spectal_extraction" value="0.2" />
119 <param name="Radius_sky_image" value="2.5" />
120 <param name="Site" value="North" />
121 <param name="Telescopes_LST" value="True" />
122 <param name="Telescopes_MST" value="True" />
123 <param name="Telescopes_SST" value="False" />
124 <param name="Texp" value="1.0" />
125 </conditional>
126 <assert_stdout>
127 <has_text text="*** Job finished successfully ***" />
128 </assert_stdout>
129 </test>
130 </tests>
131 <help>This service provides simulaiton of observations with `Cherenkov
132 Telescope Array (CTA) &lt;https://www.cta-observatory.org/&gt;`__ observatory
133 (now in construction), based on the Instrument Response Funcitons (IRF)
134 from Monte-Carlo Production 5: |DOI|. The simulation is done using
135 `Gammapy &lt;https://gammapy.org/&gt;`__ package.
136
137 Two possibilities for defining the sky model are available:
138 ``Simulate_pointing_using_pre-defined_model`` and
139 ``Simulate_pointing_using_model_cube_file``. The &#8220;pre-defined model&#8221;
140 option provides a possibility to simulate a source at sky position
141 ``RA``, ``DEC``, with a power-law spectrum,
142 ``dN/dE=F0 (E/E0)^{-\Gamma}``, considering also the effect of absorption
143 on the Extragalactic Backgorund Light (EBL, based on `Franceschini et
144 al.&#160;(2017) &lt;https://arxiv.org/abs/1705.10256&gt;`__ model. In the &#8220;model
145 cube file&#8221; approach, the sky model is loaded from a datacube file (to be
146 uploaded from an URL to be given in the parameter box). The model cube
147 describes source counts as a function of ``RA``, ``DEC`` and energy
148 ``E``. Hence, both the source position on the sky and the model source
149 spectrum are encoded directly in the data cube.
150
151 Parameters that can be adjusted are the source position (``RA``,
152 ``DEC``), the off-axis angle in the telescope field-of-view, ``R_s``,
153 Radius of the sky image around the source position, ``Radius`` (used in
154 the image preview), the exposure time in hours, ``Texp``, source
155 redshift ``z``, the powerlaw flux normalisation ``F0`` and the reference
156 energy of normalisation ``E0`` (in TeV), the slope of the powerlaw
157 spectrum ``Gamma``, radius of the spectral extraction region ``R_s``
158 used in the count-spectrum preview.
159
160 For the sources visible from both South and North CTA sites, it is
161 possible to choose between ``South`` and ``North`` sites. It is also
162 possible to simulate observations with different CTA sub-arrays: Large
163 Size Telescopes (LST), Medium Size Telescopes (MST), Small Size
164 Telescopes (SST). Note that in the &#8220;Production 5&#8221; Monte-Carlo
165 simulations of the telescope responses it was assumed that the Northern
166 site will host only LST and MST sub-arrays (no SST available), while the
167 Southern site will have MST and SST sub-arrays (no LST available).
168
169 Four data products are generated: the Data Level 3 (DL3) event list (a
170 FITS file), a sky image, a &#8220;theta-square plot&#8221; showsing distribution of
171 gamma-like events around the the source position, and the count-spectrum
172 showing the excess counts as a funciton of energy. The image, spectrum
173 and theta-square plot are for &#8220;preview&#8221; of the event set, further
174 analysis of the simulated events can be done with deticated imaging and
175 spectral analysis tools.
176
177 .. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5499840.svg
178 :target: https://doi.org/10.5281/zenodo.5499840
179 </help>
180 <citations>
181 <citation type="doi">10.1007/s10686-011-9247-0</citation>
182 </citations>
183 </tool>