Mercurial > repos > astroteam > source_extractor_astro_tool
comparison source_extractor_astro_tool.xml @ 0:f4648bd69d48 draft default tip
planemo upload for repository https://github.com/esg-epfl-apc/tools-astro/tree/main/tools commit 89e20bd2ec941d1d362da85bd81230419a1a4b2a
| author | astroteam |
|---|---|
| date | Fri, 18 Jul 2025 14:23:35 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:f4648bd69d48 |
|---|---|
| 1 <tool id="source_extractor_astro_tool" name="source-extractor" version="0.0.1+galaxy0" profile="24.0"> | |
| 2 <requirements> | |
| 3 <requirement type="package" version="6.1.4">astropy</requirement> | |
| 4 <requirement type="package" version="3.10.3">matplotlib</requirement> | |
| 5 <requirement type="package" version="1.21.4">wget</requirement> | |
| 6 <requirement type="package" version="1.4.1">sep</requirement> | |
| 7 <requirement type="package" version="1.2.33">oda-api</requirement> | |
| 8 <requirement type="package" version="2025.6.11">tifffile</requirement> | |
| 9 <requirement type="package" version="9.4.0">ipython</requirement> | |
| 10 <!--Requirements string 'nb2workflow>=1.3.30' can't be converted automatically. Please add the galaxy/conda requirement manually or modify the requirements file!--> | |
| 11 </requirements> | |
| 12 <command detect_errors="exit_code">ipython '$__tool_directory__/source_extraction.py'</command> | |
| 13 <environment_variables> | |
| 14 <environment_variable name="BASEDIR">$__tool_directory__</environment_variable> | |
| 15 <environment_variable name="GALAXY_TOOL_DIR">$__tool_directory__</environment_variable> | |
| 16 </environment_variables> | |
| 17 <configfiles> | |
| 18 <inputs name="inputs" filename="inputs.json" data_style="paths" /> | |
| 19 </configfiles> | |
| 20 <inputs> | |
| 21 <param name="input_file" type="data" label="Input file" format="data" optional="false" /> | |
| 22 <param name="mask_file" type="data" label="Mask file" format="data" optional="true" /> | |
| 23 <param name="thresh" type="float" value="1.5" label="thresh" optional="false" /> | |
| 24 <param name="err_option" type="select" label="err_option" optional="false"> | |
| 25 <option value="array_rms">array_rms</option> | |
| 26 <option value="float_globalrms" selected="true">float_globalrms</option> | |
| 27 <option value="none">none</option> | |
| 28 </param> | |
| 29 <param name="maskthresh" type="float" value="0.0" label="maskthresh" optional="false" /> | |
| 30 <param name="minarea" type="integer" value="5" label="minarea" optional="false" /> | |
| 31 <param name="filter_case" type="select" label="Filter Case" optional="false"> | |
| 32 <option value="default" selected="true">default</option> | |
| 33 <option value="file">file</option> | |
| 34 <option value="none">none</option> | |
| 35 </param> | |
| 36 <param name="filter_file" type="data" label="Filter file" format="data" optional="true" /> | |
| 37 <param name="filter_type" type="select" label="filter_type" optional="false"> | |
| 38 <option value="conv">conv</option> | |
| 39 <option value="matched" selected="true">matched</option> | |
| 40 </param> | |
| 41 <param name="deblend_nthresh" type="integer" value="32" label="deblend_nthresh" optional="false" /> | |
| 42 <param name="deblend_cont" type="float" value="0.005" label="deblend_cont" optional="false" /> | |
| 43 <param name="clean" type="boolean" checked="true" label="clean" optional="false" /> | |
| 44 <param name="clean_param" type="float" value="1.0" label="clean_param" optional="false" /> | |
| 45 <param name="bw" type="integer" value="64" label="bw" optional="false" /> | |
| 46 <param name="bh" type="integer" value="64" label="bh" optional="false" /> | |
| 47 <param name="fw" type="integer" value="3" label="fw" optional="false" /> | |
| 48 <param name="fh" type="integer" value="3" label="fh" optional="false" /> | |
| 49 <param name="fthresh" type="float" value="0.0" label="fthresh" optional="false" /> | |
| 50 </inputs> | |
| 51 <outputs> | |
| 52 <data label="${tool.name} -> source_extraction bkg_picture" name="out_source_extraction_bkg_picture" format="auto" from_work_dir="bkg_picture_galaxy.output" /> | |
| 53 <data label="${tool.name} -> source_extraction rms_picture" name="out_source_extraction_rms_picture" format="auto" from_work_dir="rms_picture_galaxy.output" /> | |
| 54 <data label="${tool.name} -> source_extraction data_picture" name="out_source_extraction_data_picture" format="auto" from_work_dir="data_picture_galaxy.output" /> | |
| 55 <data label="${tool.name} -> source_extraction sources_picture" name="out_source_extraction_sources_picture" format="auto" from_work_dir="sources_picture_galaxy.output" /> | |
| 56 <data label="${tool.name} -> source_extraction segmentation_map_picture" name="out_source_extraction_segmentation_map_picture" format="auto" from_work_dir="segmentation_map_picture_galaxy.output" /> | |
| 57 <data label="${tool.name} -> source_extraction segmentation_map" name="out_source_extraction_segmentation_map" format="auto" from_work_dir="segmentation_map_galaxy.output" /> | |
| 58 <data label="${tool.name} -> source_extraction bkg_array" name="out_source_extraction_bkg_array" format="auto" from_work_dir="bkg_array_galaxy.output" /> | |
| 59 <data label="${tool.name} -> source_extraction rms_array" name="out_source_extraction_rms_array" format="auto" from_work_dir="rms_array_galaxy.output" /> | |
| 60 <data label="${tool.name} -> source_extraction catalog_table" name="out_source_extraction_catalog_table" format="auto" from_work_dir="catalog_table_galaxy.output" /> | |
| 61 </outputs> | |
| 62 <tests> | |
| 63 <test expect_num_outputs="9"> | |
| 64 <param name="input_file" location="https://gitlab.renkulab.io/astronomy/mmoda/source-extractor/-/raw/5680fc685979c56c69f98eec8153673422abfa72/input.fits" /> | |
| 65 <param name="thresh" value="1.5" /> | |
| 66 <param name="err_option" value="float_globalrms" /> | |
| 67 <param name="maskthresh" value="0.0" /> | |
| 68 <param name="minarea" value="5" /> | |
| 69 <param name="filter_case" value="default" /> | |
| 70 <param name="filter_type" value="matched" /> | |
| 71 <param name="deblend_nthresh" value="32" /> | |
| 72 <param name="deblend_cont" value="0.005" /> | |
| 73 <param name="clean" value="True" /> | |
| 74 <param name="clean_param" value="1.0" /> | |
| 75 <param name="bw" value="64" /> | |
| 76 <param name="bh" value="64" /> | |
| 77 <param name="fw" value="3" /> | |
| 78 <param name="fh" value="3" /> | |
| 79 <param name="fthresh" value="0.0" /> | |
| 80 <assert_stdout> | |
| 81 <has_text text="*** Job finished successfully ***" /> | |
| 82 </assert_stdout> | |
| 83 </test> | |
| 84 </tests> | |
| 85 <help>Source extractor | |
| 86 ================ | |
| 87 | |
| 88 This tool can be used to extract luminous sources from sky images. It is | |
| 89 entirely based on the | |
| 90 `sep <https://sep.readthedocs.io/en/stable/index.html>`__ package, which | |
| 91 is built on `Source | |
| 92 Extractor <https://sextractor.readthedocs.io/en/latest/Introduction.html>`__. | |
| 93 | |
| 94 Input | |
| 95 ----- | |
| 96 | |
| 97 Important input parameters: | |
| 98 | |
| 99 1. **Input file** (``.fits`` or ``.tiff``) - A single-channel sky image | |
| 100 to analyze. | |
| 101 | |
| 102 2. **Mask file** (``.fits`` or ``.tiff``; optional) - A 2D numpy array. | |
| 103 True values, or numeric values greater than **maskthresh**, are | |
| 104 considered masked. Masking a pixel is equivalent to setting data to | |
| 105 zero and noise (if present) to infinity. | |
| 106 | |
| 107 3. **thresh** - Threshold pixel value for detection: | |
| 108 ``thresh * err[j, i]``, where ``err[j, i]`` is given by the | |
| 109 **err_option** parameter; ``j`` and ``i`` represent the pixel indices | |
| 110 | |
| 111 4. **err_option** - Sets the error that is taken into account into the | |
| 112 detection of sources: | |
| 113 | |
| 114 - ``none`` - The value of **thresh** is taken as an absolute | |
| 115 threshold. | |
| 116 - ``array_rms`` - An array of the background RMS, i.e. for each | |
| 117 individual pixel. | |
| 118 - ``float_globalrms`` - A float value of the global background RMS. | |
| 119 | |
| 120 The rest of the parameters are described in the documentations of | |
| 121 `sep.Background <https://sep.readthedocs.io/en/stable/api/sep.Background.html#sep.Background>`__ | |
| 122 and | |
| 123 `sep.extract <https://sep.readthedocs.io/en/stable/api/sep.extract.html#sep.extract>`__. | |
| 124 | |
| 125 Output | |
| 126 ------ | |
| 127 | |
| 128 Source Catalog | |
| 129 ~~~~~~~~~~~~~~ | |
| 130 | |
| 131 The catalogue of sources is explained | |
| 132 `here <https://sep.readthedocs.io/en/stable/api/sep.extract.html#sep.extract>`__. | |
| 133 | |
| 134 Images | |
| 135 ~~~~~~ | |
| 136 | |
| 137 There are 4 images as output: | |
| 138 | |
| 139 - **Background**: | |
| 140 | |
| 141 - ``.fits``: The output of ``sep.Background`` function, i.e. the | |
| 142 estimated 2D background of the input image. | |
| 143 - ``.png``: The gray-scale image of the previously described array | |
| 144 | |
| 145 - **Background noise**: | |
| 146 | |
| 147 - ``.fits``: The RMS of the background image. | |
| 148 - ``.png``: The gray-scale image of the previously described array | |
| 149 | |
| 150 - **Input image** - The gray-scale input image. | |
| 151 - **Sources** - The sources on the background subtracted input image | |
| 152 - **Segmentation map**: | |
| 153 | |
| 154 - ``.fits``: Each pixel is labeled with 0 or object ID (``0`` = | |
| 155 background; ``i+1`` = object ``i``). | |
| 156 - ``.png``: Binary mask (``1`` = source, ``0`` = background). | |
| 157 | |
| 158 Acknowledgement | |
| 159 --------------- | |
| 160 | |
| 161 Bertin, E. & Arnouts, S. 1996: `SExtractor: Software for source | |
| 162 extraction <https://ui.adsabs.harvard.edu/abs/1996A%26AS..117..393B/abstract>`__, | |
| 163 Astronomy & Astrophysics Supplement 317, 393 | |
| 164 | |
| 165 Barbary, (2016), SEP: Source Extractor as a library, Journal of Open | |
| 166 Source Software, 1(6), 58, doi:10.21105/joss.00058 | |
| 167 </help> | |
| 168 <citations> | |
| 169 <citation type="doi">10.1051/aas:1996164</citation> | |
| 170 <citation type="doi">10.21105/joss.00058</citation> | |
| 171 </citations> | |
| 172 </tool> |
