Skip to content

Commit

Permalink
Update tool CTA to 0.0.1+galaxy0 (#87)
Browse files Browse the repository at this point in the history
* update tool CTA

* update tool CTA

* update tool CTA

* update tool CTA

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/49065768f98c52327b2b30fc813733cd14fb37cf

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/6a4670b2b8db6487242ddc3610fe3ccc357253ac

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/6a4670b2b8db6487242ddc3610fe3ccc357253ac

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/325e7bfb6519e54a621633928b2b6b37ff9276ca

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/f08d83dad899b507c557c4b0e402d74c33c71980

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/b0829ebacc60443c2e6f2fd224798b0980f795ad

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/bcdce94db3b711b48692ea49ef5eff760c785679

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/8ce4aecfa05f7e5063d7bb6de904c53c8ae9da92

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/b8b346a8ed0483466317eeae38e03efebf9f8517

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/5cd39d0a81d0d5e9806335608de5c8f5a9b3e029

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/3daae04126c9136e10622a768fcc6c4bf2301c11

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/1edc36874981c53e78305d73dca214499afd53b0

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/4add33e1f3cc08f10ddbf5ae9a1715ab74f223be

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/6c8b1e33505a8ec3078fb73653023e3ecd999dc5

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/3a5fc5326dc631d7baa0aee11fc59233602bdcda

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/a14bf376bbfdf26ed48a0918ec093b49afe6f7a9

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/c01b5a0c4cde4b163f22efdd48fcefc42e3550ed

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/9900ddbf5d117753f55672cc6528cac116898fcf

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/d456ca4a686593154ddef231706f8a3eb1c96ec5

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/db091e1141a9fa000eae2db06439f6274786661c

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/528576cfe53c0f9f240b613f13e0e8c682ef4385

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/8f73f7e930b50e277ddd89e028530fe423c14597

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/299cbce054c111278e8a2bdae6e5a2e4fe096ee4

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/5b2b217a3b43faafc0db76ae1e5baa16cfbf9de4

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/183fc9bd1c293d0d4764d55543c1d334283f2c5e

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/913bd93c2aec50a48143df95bada6995a94282d3

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/abcb3c0a7166f8131aeab35239b4ee09164f3ef2

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/eb5e32f759da0d8591ee173a5d4840114f3e1290

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/83c77cd93286a9331e1b8089df48c58d4f0d6561

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/8e5ea4abfe283a33a57e204fcd2278834be5906a

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/824de063f21a3243c9e243dfb754e659739b623f

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/8c92fa2e6c4fc7c17e9c9708e5d580fa40f52f68

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/f34258a61442be5147078df8fef93ee5f0dec69b

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/6904fc4ace1f6591ec25c82f7e989cc4e37e220a

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/bf65e4dd785f502e0fdd49ccaea823bb051b3df9

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/a491af46e18f1ca638986a19d903ee73b9025f12

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/25ca45f439737879326f477e848ebf2fcd3eb3dc

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/f06a6d4a6406eee8439eb88ca91367f8783f55de

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/16c13cd7e160d0d275730f2ba6f6a2aea3bc3c47

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/065d1c552acc1830eaed585884e1a4e497e60404

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/d89bb7c72597d0acfdca0ade53543b309be3b606

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/e37aca06cb94cb0ad79625c0868b3264fdd82264

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/3ca28efe2f50832c78cbf5d866de9d96c66e8710

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/695ae0123f1be2650949f7c394ee1a374bb81dbb

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/edb411d5f9e932080296431e4b26666dd1feaacf

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/fd029be5e2ea447eb7fc483beed2ed5528c62895

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/1e22bdb59c475ba9ecf2454a7d939b913d753733

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/f30ac33c28aab378132f337dde4a581e711fc7be

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/f5dff70bc27959489bc770c96c14e5d5ac081ba5

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/44a4b49690438f337842badc414853b557f301cf

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/eaa17eda7012b4452039d43f5662c977f5ec52fc

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/9c774bc9aad2f97c0789269b1c8c7ee3bdedb177

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/037e5b7c2a93064914b011f5096baa535a0b8dfa

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/e9783d8e2465e9f4fc8036293982fa10334750f1

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/3d8da5193b19e3501f3969d9b0e7dedb63c73505

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/6a2b90ec28f6626055e81e17bf80937d8dc66845

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/860d9fcbdb95119f7de46dbacdda278c0f36c9d8

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/80faf8f957858fad766c1ad3038f0afce643474e

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/373e9b57cc8ecda1cd4363a61dc11aa98ffb2f49

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/c1ec83edc4aed8f5cca66af1893059ad879dd782

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/61e916839ae5e25ee0160d59f66b7931d34fd45a

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/f69b87329ec85552715bb240f5e0fd7e5961701c

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/f2292709348fc7128091d1a94d0c1a87e9f501a8

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/07c107c1a4b8498a14614413ad7c69dd61948ef3

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/e4deb5d1158be9f2fc7304d476529243158e4a6f

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/29ab850e0f625d2b8bfc7708c477d05fef1e0114

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/d696f2ccfa268ff53ce21ea635ab78126acc5ac4

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/895ac9dd49bd883e6e6afe2a45d284d09aa6196d

* automatic update

following https://gitlab.renkulab.io/astronomy/mmoda/cta/-/commit/b3f69b091ce942c05ad035220501ea078d54de26

---------

Co-authored-by: ODA bot <[email protected]>
  • Loading branch information
dsavchenko and ODA bot authored Apr 19, 2024
1 parent 2f23ec0 commit 4543470
Show file tree
Hide file tree
Showing 4 changed files with 1,198 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/cta/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
categories:
- Astronomy
description: Basic simulation of CTA telescope observations using gammapy package
homepage_url: null
long_description: Basic simulation of CTA telescope observations using gammapy package
name: cta_astro_tool
owner: astroteam
remote_repository_url: https://github.com/esg-epfl-apc/tools-astro/tree/main/tools
type: unrestricted
183 changes: 183 additions & 0 deletions tools/cta/cta_astro_tool.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
<tool id="cta_astro_tool" name="CTA" version="0.0.1+galaxy0" profile="23.0">
<requirements>
<requirement type="package" version="6.0">unzip</requirement>
<requirement type="package" version="2.31.0">requests</requirement>
<requirement type="package" version="1.2">gammapy</requirement>
<requirement type="package" version="5.3">astropy</requirement>
<requirement type="package" version="3.8.4">matplotlib</requirement>
<requirement type="package" version="1.11.4">scipy</requirement>
<requirement type="package" version="1.2.15">oda-api</requirement>
<requirement type="package" version="8.22.2">ipython</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>
</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="pre-defined_model" selected="true">pre-defined_model</option>
<option value="model_cube_file" selected="false">model_cube_file</option>
</param>
<when value="pre-defined_model">
<param name="RA" type="float" value="166.113809" label="RA (unit: deg)" />
<param name="DEC" type="float" value="38.208833" label="DEC (unit: deg)" />
<param name="OffAxis_angle" type="float" value="0.78" label="OffAxis_angle (unit: deg)" />
<param name="Texp" type="float" value="1.0" label="Texp (unit: hour)" />
<param name="z" type="float" value="0.03" label="z" />
<param name="F0" type="float" value="1e-11" label="F0" />
<param name="E0" type="float" value="1.0" label="E0 (unit: TeV)" />
<param name="Gamma" type="float" value="2.0" label="Gamma" />
<param name="Radius_spectal_extraction" type="float" value="0.2" label="Radius_spectal_extraction" />
<param name="Radius_sky_image" type="float" value="2.5" label="Radius_sky_image (unit: deg)" />
<param name="Site" type="select" label="Site">
<option value="North" selected="true">North</option>
<option value="South">South</option>
</param>
<param name="Telescope_LST" type="boolean" checked="true" label="Telescope_LST" />
<param name="Telescope_MST" type="boolean" checked="true" label="Telescope_MST" />
<param name="Telescope_SST" type="boolean" label="Telescope_SST" />
</when>
<when value="model_cube_file">
<param name="data_cube" type="data" label="data_cube" format="data" />
<param name="F0" type="float" value="1e-11" label="F0" />
<param name="E0" type="float" value="1.0" label="E0 (unit: TeV)" />
<param name="OffAxis_angle" type="float" value="0.4" label="OffAxis_angle (unit: deg)" />
<param name="Radius_spectal_extraction" type="float" value="0.2" label="Radius_spectal_extraction (unit: deg)" />
<param name="Radius_sky_image" type="float" value="2.5" label="Radius_sky_image (unit: deg)" />
<param name="Site" type="select" label="Site">
<option value="North" selected="true">North</option>
<option value="South">South</option>
</param>
<param name="Telescopes_LST" type="boolean" checked="true" label="Telescopes_LST" />
<param name="Telescopes_MST" type="boolean" checked="true" label="Telescopes_MST" />
<param name="Telescopes_SST" type="boolean" label="Telescopes_SST" />
<param name="Texp" type="float" value="1.0" label="Texp (unit: hour)" />
</when>
</conditional>
</inputs>
<outputs>
<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">
<filter>_data_product['_selector'] == 'pre-defined_model'</filter>
</data>
<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">
<filter>_data_product['_selector'] == 'pre-defined_model'</filter>
</data>
<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">
<filter>_data_product['_selector'] == 'pre-defined_model'</filter>
</data>
<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">
<filter>_data_product['_selector'] == 'pre-defined_model'</filter>
</data>
<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">
<filter>_data_product['_selector'] == 'model_cube_file'</filter>
</data>
<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">
<filter>_data_product['_selector'] == 'model_cube_file'</filter>
</data>
<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">
<filter>_data_product['_selector'] == 'model_cube_file'</filter>
</data>
<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">
<filter>_data_product['_selector'] == 'model_cube_file'</filter>
</data>
</outputs>
<tests>
<test expect_num_outputs="4">
<conditional name="_data_product">
<param name="_selector" value="pre-defined_model" />
<param name="RA" value="166.113809" />
<param name="DEC" value="38.208833" />
<param name="OffAxis_angle" value="0.78" />
<param name="Texp" value="1.0" />
<param name="z" value="0.03" />
<param name="F0" value="1e-11" />
<param name="E0" value="1.0" />
<param name="Gamma" value="2.0" />
<param name="Radius_spectal_extraction" value="0.2" />
<param name="Radius_sky_image" value="2.5" />
<param name="Site" value="North" />
<param name="Telescope_LST" value="True" />
<param name="Telescope_MST" value="True" />
<param name="Telescope_SST" value="False" />
</conditional>
<assert_stdout>
<has_text text="*** Job finished successfully ***" />
</assert_stdout>
</test>
<test expect_num_outputs="4">
<conditional name="_data_product">
<param name="_selector" value="model_cube_file" />
<param name="data_cube" location="https://gitlab.renkulab.io/astronomy/mmoda/cta/-/raw/b3f69b091ce942c05ad035220501ea078d54de26/3d.fits" />
<param name="F0" value="1e-11" />
<param name="E0" value="1.0" />
<param name="OffAxis_angle" value="0.4" />
<param name="Radius_spectal_extraction" value="0.2" />
<param name="Radius_sky_image" value="2.5" />
<param name="Site" value="North" />
<param name="Telescopes_LST" value="True" />
<param name="Telescopes_MST" value="True" />
<param name="Telescopes_SST" value="False" />
<param name="Texp" value="1.0" />
</conditional>
<assert_stdout>
<has_text text="*** Job finished successfully ***" />
</assert_stdout>
</test>
</tests>
<help>This service provides simulaiton of observations with `Cherenkov
Telescope Array (CTA) &lt;https://www.cta-observatory.org/&gt;`__ observatory
(now in construction), based on the Instrument Response Funcitons (IRF)
from Monte-Carlo Production 5: |DOI|. The simulation is done using
`Gammapy &lt;https://gammapy.org/&gt;`__ package.

Two possibilities for defining the sky model are available:
``Simulate_pointing_using_pre-defined_model`` and
``Simulate_pointing_using_model_cube_file``. The &#8220;pre-defined model&#8221;
option provides a possibility to simulate a source at sky position
``RA``, ``DEC``, with a power-law spectrum,
``dN/dE=F0 (E/E0)^{-\Gamma}``, considering also the effect of absorption
on the Extragalactic Backgorund Light (EBL, based on `Franceschini et
al.&#160;(2017) &lt;https://arxiv.org/abs/1705.10256&gt;`__ model. In the &#8220;model
cube file&#8221; approach, the sky model is loaded from a datacube file (to be
uploaded from an URL to be given in the parameter box). The model cube
describes source counts as a function of ``RA``, ``DEC`` and energy
``E``. Hence, both the source position on the sky and the model source
spectrum are encoded directly in the data cube.

Parameters that can be adjusted are the source position (``RA``,
``DEC``), the off-axis angle in the telescope field-of-view, ``R_s``,
Radius of the sky image around the source position, ``Radius`` (used in
the image preview), the exposure time in hours, ``Texp``, source
redshift ``z``, the powerlaw flux normalisation ``F0`` and the reference
energy of normalisation ``E0`` (in TeV), the slope of the powerlaw
spectrum ``Gamma``, radius of the spectral extraction region ``R_s``
used in the count-spectrum preview.

For the sources visible from both South and North CTA sites, it is
possible to choose between ``South`` and ``North`` sites. It is also
possible to simulate observations with different CTA sub-arrays: Large
Size Telescopes (LST), Medium Size Telescopes (MST), Small Size
Telescopes (SST). Note that in the &#8220;Production 5&#8221; Monte-Carlo
simulations of the telescope responses it was assumed that the Northern
site will host only LST and MST sub-arrays (no SST available), while the
Southern site will have MST and SST sub-arrays (no LST available).

Four data products are generated: the Data Level 3 (DL3) event list (a
FITS file), a sky image, a &#8220;theta-square plot&#8221; showsing distribution of
gamma-like events around the the source position, and the count-spectrum
showing the excess counts as a funciton of energy. The image, spectrum
and theta-square plot are for &#8220;preview&#8221; of the event set, further
analysis of the simulated events can be done with deticated imaging and
spectral analysis tools.

.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5499840.svg
:target: https://doi.org/10.5281/zenodo.5499840
</help>
<citations>
<citation type="doi">10.1007/s10686-011-9247-0</citation>
</citations>
</tool>
Loading

0 comments on commit 4543470

Please sign in to comment.