diff crbeam_astro_tool.xml @ 0:f40d05521dca draft default tip

planemo upload for repository https://github.com/esg-epfl-apc/tools-astro/tree/main/tools commit de01e3c02a26cd6353a6b9b6f8d1be44de8ccd54
author astroteam
date Fri, 25 Apr 2025 19:33:20 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/crbeam_astro_tool.xml	Fri Apr 25 19:33:20 2025 +0000
@@ -0,0 +1,260 @@
+<tool id="crbeam_astro_tool" name="CRbeam" version="0.0.2+galaxy0" profile="24.0">
+  <requirements>
+    <requirement type="package" version="1.1.1">crbeam</requirement>
+    <requirement type="package" version="19.0.1">pyarrow</requirement>
+    <requirement type="package" version="6.0">unzip</requirement>
+    <requirement type="package" version="1.2.37">oda-api</requirement>
+    <requirement type="package" version="3.9.4">matplotlib</requirement>
+    <requirement type="package" version="0.13.2">seaborn</requirement>
+    <requirement type="package" version="7.2.15">minio</requirement>
+    <requirement type="package" version="1.19.0">specutils</requirement>
+    <requirement type="package" version="1.11.4">scipy</requirement>
+    <requirement type="package" version="1.3">gammapy</requirement>
+    <requirement type="package" version="0.4.10">astroquery</requirement>
+    <requirement type="package" version="5.3">astropy</requirement>
+    <requirement type="package" version="9.1.0">ipython</requirement>
+  </requirements>
+  <command detect_errors="exit_code">ipython '$__tool_directory__/${C_data_product_.DPselector_}.py'</command>
+  <environment_variables>
+    <environment_variable name="BASEDIR">$__tool_directory__</environment_variable>
+    <environment_variable name="GALAXY_TOOL_DIR">$__tool_directory__</environment_variable>
+  </environment_variables>
+  <configfiles>
+    <inputs name="inputs" filename="inputs.json" data_style="paths" />
+  </configfiles>
+  <inputs>
+    <conditional name="C_data_product_">
+      <param name="DPselector_" type="select" label="Data Product">
+        <option value="Generate_events" selected="true">Generate_events</option>
+        <option value="Generate_figures" selected="false">Generate_figures</option>
+      </param>
+      <when value="Generate_events">
+        <param name="src_name" type="text" value="1ES 1215+303" label="src_name" optional="false" />
+        <param name="z_start" type="float" value="0.13" label="z_start" optional="false" />
+        <param name="Npart" type="integer" value="10000" label="Npart" min="1" max="100000" optional="false" />
+        <param name="particle_type" type="select" label="particle_type" optional="false">
+          <option value="electron">electron</option>
+          <option value="gamma" selected="true">gamma</option>
+          <option value="proton">proton</option>
+        </param>
+        <param name="Emax" type="float" value="50" label="Emax (unit: TeV)" optional="false" />
+        <param name="Emin" type="float" value="0.01" label="Emin (unit: TeV)" optional="false" />
+        <param name="EminSource" type="float" value="0.01" label="EminSource (unit: TeV)" optional="false" />
+        <param name="Gamma" type="float" value="2.0" label="Gamma" optional="false" />
+        <param name="EGMF_fG" type="float" value="100" label="EGMF_fG" optional="false" />
+        <param name="lmaxEGMF_Mpc" type="float" value="5" label="lmaxEGMF_Mpc" optional="false" />
+        <param name="jet_half_size" type="float" value="180.0" label="jet_half_size (unit: deg)" optional="false" />
+        <param name="jet_direction" type="float" value="0.0" label="jet_direction (unit: deg)" optional="false" />
+        <param name="psf" type="float" value="180.0" label="psf (unit: deg)" optional="false" />
+        <param name="window_size_RA" type="float" value="4.0" label="window_size_RA (unit: deg)" optional="false" />
+        <param name="window_size_DEC" type="float" value="4.0" label="window_size_DEC (unit: deg)" optional="false" />
+        <param name="EBL" type="select" label="EBL" optional="false">
+          <option value="Franceschini 2017" selected="true">Franceschini 2017</option>
+          <option value="Inoue 2012 Baseline">Inoue 2012 Baseline</option>
+          <option value="Inoue 2012 lower limit">Inoue 2012 lower limit</option>
+          <option value="Inoue 2012 upper limit">Inoue 2012 upper limit</option>
+          <option value="Stecker 2016 lower limit">Stecker 2016 lower limit</option>
+          <option value="Stecker 2016 upper limit">Stecker 2016 upper limit</option>
+        </param>
+      </when>
+      <when value="Generate_figures">
+        <param name="src_name" type="text" value="NGC 1365" label="src_name" optional="false" />
+        <param name="z_start" type="float" value="0" label="z_start" optional="false" />
+        <param name="Npart" type="integer" value="2000" label="Npart" min="1" max="100000" optional="false" />
+        <param name="particle_type" type="select" label="particle_type" optional="false">
+          <option value="electron">electron</option>
+          <option value="gamma" selected="true">gamma</option>
+          <option value="proton">proton</option>
+        </param>
+        <param name="Emax" type="float" value="30" label="Emax (unit: TeV)" optional="false" />
+        <param name="Emin" type="float" value="0.01" label="Emin (unit: TeV)" optional="false" />
+        <param name="EminSource" type="float" value="1.0" label="EminSource (unit: TeV)" optional="false" />
+        <param name="Gamma" type="float" value="2.0" label="Gamma" optional="false" />
+        <param name="EGMF_fG" type="float" value="10" label="EGMF_fG" optional="false" />
+        <param name="lmaxEGMF_Mpc" type="float" value="5" label="lmaxEGMF_Mpc" optional="false" />
+        <param name="jet_half_size" type="float" value="5.0" label="jet_half_size (unit: deg)" optional="false" />
+        <param name="jet_direction" type="float" value="0.0" label="jet_direction (unit: deg)" optional="false" />
+        <param name="psf" type="float" value="1.0" label="psf (unit: deg)" optional="false" />
+        <param name="window_size_RA" type="float" value="2.0" label="window_size_RA (unit: deg)" optional="false" />
+        <param name="window_size_DEC" type="float" value="1.0" label="window_size_DEC (unit: deg)" optional="false" />
+        <param name="EBL" type="select" label="EBL" optional="false">
+          <option value="Franceschini 2017" selected="true">Franceschini 2017</option>
+          <option value="Inoue 2012 Baseline">Inoue 2012 Baseline</option>
+          <option value="Inoue 2012 lower limit">Inoue 2012 lower limit</option>
+          <option value="Inoue 2012 upper limit">Inoue 2012 upper limit</option>
+          <option value="Stecker 2016 lower limit">Stecker 2016 lower limit</option>
+          <option value="Stecker 2016 upper limit">Stecker 2016 upper limit</option>
+        </param>
+      </when>
+    </conditional>
+  </inputs>
+  <outputs>
+    <data label="${tool.name} -&gt; Generate_events Event_file" name="out_Generate_events_Event_file" format="auto" from_work_dir="Event_file_galaxy.output">
+      <filter>C_data_product_['DPselector_'] == 'Generate_events'</filter>
+    </data>
+    <data label="${tool.name} -&gt; Generate_figures spectrum_png" name="out_Generate_figures_spectrum_png" format="auto" from_work_dir="spectrum_png_galaxy.output">
+      <filter>C_data_product_['DPselector_'] == 'Generate_figures'</filter>
+    </data>
+    <data label="${tool.name} -&gt; Generate_figures light_curve_png" name="out_Generate_figures_light_curve_png" format="auto" from_work_dir="light_curve_png_galaxy.output">
+      <filter>C_data_product_['DPselector_'] == 'Generate_figures'</filter>
+    </data>
+    <data label="${tool.name} -&gt; Generate_figures total_spectrum_table" name="out_Generate_figures_total_spectrum_table" format="auto" from_work_dir="total_spectrum_table_galaxy.output">
+      <filter>C_data_product_['DPselector_'] == 'Generate_figures'</filter>
+    </data>
+    <data label="${tool.name} -&gt; Generate_figures psf_spectrum_table" name="out_Generate_figures_psf_spectrum_table" format="auto" from_work_dir="psf_spectrum_table_galaxy.output">
+      <filter>C_data_product_['DPselector_'] == 'Generate_figures'</filter>
+    </data>
+    <data label="${tool.name} -&gt; Generate_figures lc_result" name="out_Generate_figures_lc_result" format="auto" from_work_dir="lc_result_galaxy.output">
+      <filter>C_data_product_['DPselector_'] == 'Generate_figures'</filter>
+    </data>
+    <data label="${tool.name} -&gt; Generate_figures spectrum" name="out_Generate_figures_spectrum" format="auto" from_work_dir="spectrum_galaxy.output">
+      <filter>C_data_product_['DPselector_'] == 'Generate_figures'</filter>
+    </data>
+    <data label="${tool.name} -&gt; Generate_figures spectrum_rotated" name="out_Generate_figures_spectrum_rotated" format="auto" from_work_dir="spectrum_rotated_galaxy.output">
+      <filter>C_data_product_['DPselector_'] == 'Generate_figures'</filter>
+    </data>
+    <data label="${tool.name} -&gt; Generate_figures map3d" name="out_Generate_figures_map3d" format="auto" from_work_dir="map3d_galaxy.output">
+      <filter>C_data_product_['DPselector_'] == 'Generate_figures'</filter>
+    </data>
+    <data label="${tool.name} -&gt; Generate_figures map4d" name="out_Generate_figures_map4d" format="auto" from_work_dir="map4d_galaxy.output">
+      <filter>C_data_product_['DPselector_'] == 'Generate_figures'</filter>
+    </data>
+  </outputs>
+  <tests>
+    <test expect_num_outputs="1">
+      <conditional name="C_data_product_">
+        <param name="DPselector_" value="Generate_events" />
+        <param name="src_name" value="1ES 1215+303" />
+        <param name="z_start" value="0.13" />
+        <param name="Npart" value="10000" />
+        <param name="particle_type" value="gamma" />
+        <param name="Emax" value="50" />
+        <param name="Emin" value="0.01" />
+        <param name="EminSource" value="0.01" />
+        <param name="Gamma" value="2.0" />
+        <param name="EGMF_fG" value="100" />
+        <param name="lmaxEGMF_Mpc" value="5" />
+        <param name="jet_half_size" value="180.0" />
+        <param name="jet_direction" value="0.0" />
+        <param name="psf" value="180.0" />
+        <param name="window_size_RA" value="4.0" />
+        <param name="window_size_DEC" value="4.0" />
+        <param name="EBL" value="Franceschini 2017" />
+      </conditional>
+      <assert_stdout>
+        <has_text text="*** Job finished successfully ***" />
+      </assert_stdout>
+    </test>
+    <test expect_num_outputs="9">
+      <conditional name="C_data_product_">
+        <param name="DPselector_" value="Generate_figures" />
+        <param name="src_name" value="NGC 1365" />
+        <param name="z_start" value="0" />
+        <param name="Npart" value="2000" />
+        <param name="particle_type" value="gamma" />
+        <param name="Emax" value="30" />
+        <param name="Emin" value="0.01" />
+        <param name="EminSource" value="1.0" />
+        <param name="Gamma" value="2.0" />
+        <param name="EGMF_fG" value="10" />
+        <param name="lmaxEGMF_Mpc" value="5" />
+        <param name="jet_half_size" value="5.0" />
+        <param name="jet_direction" value="0.0" />
+        <param name="psf" value="1.0" />
+        <param name="window_size_RA" value="2.0" />
+        <param name="window_size_DEC" value="1.0" />
+        <param name="EBL" value="Franceschini 2017" />
+      </conditional>
+      <assert_stdout>
+        <has_text text="*** Job finished successfully ***" />
+      </assert_stdout>
+    </test>
+  </tests>
+  <help>CRbeam
+======
+
+This service provides simulation [1] of electron-photon cascade
+propagation in the intergalactic space. The simulation accounts for the
+interactions of photons and electrons with extragalactic background
+light (EBL) and magnetic field. As a first step and main part of
+simulation the code traces trajectories of every particle and records
+it&#8217;s position and momentum at *z=0* assuming that initially particles
+were emitted at fixed redshift *z_start* with given power law spectrum
+in the direction of *z*-axis. The source jet geometry is then taken into
+account in the second step by rotating the source image obtained during
+the first stage within the jet openning angle. This allows to reuse the
+simulation results for different jet geometries. The tool has two
+available data products:
+
+- list of events
+- list of figures
+
+Both modes have common list of input parameters:
+
+*src_name* e.g.&#160;&#8216;GRB221009A&#8217; - optional source name from Simbad database
+(ignored if *z_start* is given)
+
+*z_start* e.g.&#160;0.1 - source redshift or 0 if src_name should be used
+
+*Npart* e.g.&#160;100000 - number of particles to simulate
+
+*particle_type* - initial particle type, one of &#8220;gamma&#8221;,&#8220;electron&#8221; or
+&#8220;proton&#8221;
+
+*Emax* - maximal energy of particles emitted by the source in TeV
+
+*Emin* - minimal energy in TeV of secondary particles to trace in the
+simulation
+
+*EminSource* - minimal energy of particles emitted by the source in TeV.
+If *EminSourceTeV=EmaxTeV* fixed energy injection is assumed
+
+*Gamma* - injection spectrum power low index: dN/dE = E^{-gamma}
+
+*EGMF_fG* - amplitude of the intergalactic magnetic field in femtogauss.
+The Kolmogorov turbulence model is assumed for the magnetic field
+
+*lmaxEGMF_Mpc* - maximal scale of the magnetic field turbulence in Mpc
+
+*jet_half_size* - jet half size in degrees
+
+*jet_direction* - angle in degrees between the jet axis and the
+direction to the observer
+
+*psf* - observer instrument psf in degrees
+
+*EBL* - extragalactic background light model to use. Below is the list
+of models supported:
+
+- *Franceschini 2017*, see Ref. [2]
+- *Stecker 2016 lower limit* : lower limit model from Ref. [3]
+- *Stecker 2016 upper limit* : upper limit model from Ref. [3]
+- *Inoue 2012 Baseline* : baseline model from Ref. [4]
+- *Inoue 2012 lower limit* : lower limit model from Ref. [4]
+- *Inoue 2012 upper limit* : upper limit model from Ref. [4]
+- *zero* : CMB only
+
+References
+----------
+
+[1] O. Kalashev, A. Korochkin, A. Neronov, D. Semikoz,
+*Astron.Astrophys.* 675 (2023) A132
+
+[2] Alberto Franceschini, Giulia Rodighiero, *Astron.Astrophys.* 603
+(2017) A34
+
+[3] Floyd W. Stecker, Sean T. Scully, Matthew A. Malkan, *Astrophys.J.*
+827 (2016)
+
+[4] Yoshiyuki Inoue et al., *Astrophys.J.* 768 (2013) 197
+</help>
+  <citations>
+    <citation type="bibtex">@misc{label,
+			title = {Tool CRbeam},
+			url = {https://renkulab.io/projects/astronomy/mmoda/crbeam},
+			author = {Oleg Kalashev and Andrii Neronov},
+			year = {2024},
+			note = {}
+		}</citation>
+  </citations>
+</tool>
\ No newline at end of file