changeset 1:c780d644a93a draft

planemo upload for repository https://github.com/esg-epfl-apc/tools-astro/tree/main/tools/astropytools commit fc50bfef893e657560ba05e00858f53a53fbe2f0
author astroteam
date Fri, 25 Apr 2025 08:39:14 +0000
parents cf608e2b1436
children 6b6dc2b5e52d
files fits2bitmap.xml generate_cmaps.py test-data/legacysurvey_image.png
diffstat 3 files changed, 5 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/fits2bitmap.xml	Thu Jun 22 19:38:45 2023 +0000
+++ b/fits2bitmap.xml	Fri Apr 25 08:39:14 2025 +0000
@@ -1,7 +1,7 @@
-<tool id="astropy_fits2bitmap" name="astropy fits2bitmap" version="0.1.0+galaxy0" profile="21.05">
+<tool id="astropy_fits2bitmap" name="astropy fits2bitmap" version="0.2.0+galaxy0" profile="21.05">
     <requirements>
-        <requirement type="package" version="5.2.2">astropy</requirement>
-        <requirement type="package" version="3.6.0">matplotlib</requirement>
+        <requirement type="package" version="6.1.7">astropy</requirement>
+        <requirement type="package" version="3.10.1">matplotlib</requirement>
     </requirements>
     <command detect_errors="exit_code"><![CDATA[
         #if $reverse_cmap:
@@ -9,10 +9,11 @@
         #else:
             #set $cmap = $cmap
         #end if
-        fits2bitmap '$input_fits' --stretch '$stretch' --cmap $cmap -o out.png
+        fits2bitmap '$input_fits' --stretch '$stretch' --ext $hdu --cmap $cmap -o out.png
     ]]></command>
     <inputs>
         <param type="data" name="input_fits" format="fits" label="FITS file containing a sky image"/>
+        <param type="integer" name="hdu"  value="0" min="0" label="Select input HDU number"/>
         <param type="select" name="stretch" label="Stretch image scale" help="Type of image scale stretching">
             <option value="linear">linear</option>
             <option value="sqrt">square root</option>
--- a/generate_cmaps.py	Thu Jun 22 19:38:45 2023 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-from matplotlib import pyplot as plt
-
-cmaps = sorted(m for m in plt.cm.datad if not m.endswith("_r"))
-
-print("\n".join([f'<option value="{cm}">{cm}</option>' for cm in cmaps]))
Binary file test-data/legacysurvey_image.png has changed