-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #791 from ratt-ru/add_montage_mProject
Add montage mProject
- Loading branch information
Showing
5 changed files
with
164 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
FROM quay.io/stimela/astropy:1.7.1 | ||
RUN docker-apt-install montage vim | ||
FROM quay.io/stimela/base:1.7.1 | ||
RUN docker-apt-install montage python3-montagepy vim | ||
RUN pip install --upgrade pip setuptools | ||
RUN pip install -U montage-wrapper>=0.9.9 astroquery>=0.3.8 git+https://github.com/ratt-ru/scabha.git@positional | ||
|
||
RUN pip install -U astroquery>=0.3.8 scabha==0.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"task": "mProject", | ||
"base": "stimela/montage", | ||
"tag": "1.7.9", | ||
"description": "mProject reprojects a single image to the scale defined in a FITS header template file (read more about header templates here). The program produces a pair of images: the reprojected image and an 'area' image consisting of the fraction input pixel sky area that went into each output pixel. The 'drizzle' algorithm is implemented. The algorithm proceeds by mapping pixel corners (as adjusted by drizzle, if called) from the input pixel space to the output pixel space, calculating overlap area with each output pixel, and accumulating an appropriate fraction of the input flux into the output image pixels. In addition, the appropriate fraction of the input pixel area is accumulated into the area image pixels. Projection of points from input pixel space to output pixel space is calculated in two steps: first map from input pixel space to sky coordinates; second map from sky coordinates to output pixel space.", | ||
"prefix": "-", | ||
"binary": "mProject", | ||
"junk": [], | ||
"msdir": false, | ||
"parameters": [ | ||
{ | ||
"info": "Input FITS file to be reprojected", | ||
"dtype": "file", | ||
"name": "in.fits", | ||
"io": "input", | ||
"positional": true | ||
}, | ||
{ | ||
"info": "Path of output FITS file to be created.", | ||
"dtype":"file", | ||
"name": "out.fits", | ||
"io": "output", | ||
"positional": true | ||
}, | ||
{ | ||
"info": "FITS header template to be used in generation of output image", | ||
"name": "hdr.template", | ||
"dtype": "file", | ||
"io": "input", | ||
"positional": true | ||
}, | ||
{ | ||
"info": "Processing is done utilizing the drizzle algorithm. factor is a floating point number; recommended drizzle factors are from 0.5 to 1.", | ||
"name": "z", | ||
"dtype": "float" | ||
}, | ||
{ | ||
"info": "Causes additional debugging information to be printed to stdout. Valid levels are 1-5 (for higher debugging levels, it is recommended to redirect the output to a file).", | ||
"name": "d", | ||
"dtype": "int" | ||
}, | ||
{ | ||
"info": "Use the specified FITS extension (default is to use the first HDU with image data)", | ||
"name": "h", | ||
"dtype": "str" | ||
}, | ||
{ | ||
"info": "Apply a correction factor of scale to each pixel.", | ||
"name": "x", | ||
"dtype": "bool" | ||
}, | ||
{ | ||
"info": "Path to a weight map to be used when reading values from the input image.", | ||
"name": "w", | ||
"io": "input", | ||
"dtype": "file" | ||
}, | ||
{ | ||
"info": "Use constant weight value for the whole image", | ||
"name": "W", | ||
"dtype": "bool" | ||
}, | ||
{ | ||
"info": "Pixels with weights below threshold will be treated as blank.", | ||
"name": "t", | ||
"dtype": "float" | ||
}, | ||
{ | ||
"info": "Makes the output region (originally defined in the header template) big enough to include all of the input images.", | ||
"name": "X", | ||
"dtype": "bool" | ||
}, | ||
{ | ||
"info": "Define a border width or border pixel corners outside of which all pixels are set to NaN.", | ||
"name": "b", | ||
"dtype": "str" | ||
}, | ||
{ | ||
"info": "Process the data as total energy rather than the default energy density (scale values by relative pixel areas).", | ||
"name": "e", | ||
"dtype": "bool" | ||
}, | ||
{ | ||
"info": "Output the full region requested even if there is a border of NULL values (default is to shrinkwrap to just the pixels with values).", | ||
"name": "f", | ||
"dtype": "bool" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# -*- coding: future_fstrings -*- | ||
import sys | ||
|
||
from scabha import config, parse_parameters, prun | ||
|
||
# If a list of fields is given, insert them as repeated arguments. | ||
# Other arguments not allowed to be lists. | ||
args = [config.binary] + parse_parameters(repeat=True) | ||
|
||
# run the command | ||
if prun(args) != 0: | ||
raise SystemError(f" {config.binary} exited with a non-zero code. See logs for details") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters