@@ -15,12 +15,13 @@ if ( params.help ) {
15
15
| [default: ${ params.stilts} ]
16
16
| --convolve
17
17
| Determine the smallest psf common to all input images and then convolve all images
18
- | to this psf prior to any other processing [default: ${ params.convol } ]
18
+ | to this psf prior to any other processing [default: ${ params.convolve } ]
19
19
|
20
20
|Warping arguments:
21
- | --warp Include if you want to warp your image files (with fits_warp.py)
22
- | to correct for the ionosphere.
23
- | [default: ${ params.warp} ]
21
+ | --fits_warp Use astrometric correction via fits_warp.py.
22
+ | [default: ${ params.fits_warp} ]
23
+ | --flux_warp Use flux density correction via flux_warp.
24
+ | [default: ${ params.flux_warp} ]
24
25
| --ref_catalogue
25
26
| The reference catalogue to warp your images to match.
26
27
| [default: will download and use GLEAM catalogue]
@@ -57,8 +58,10 @@ log.info """\
57
58
ROBBIE the Space Detective
58
59
==========================
59
60
images from : ${ params.image_file}
60
- convolve img : ${ params.convol}
61
- warp ref cat : ${ params.warp} / ${ params.ref_catalogue}
61
+ convolve img : ${ params.convolve}
62
+ fits warp : ${ params.fits_warp}
63
+ flux warp : ${ params.flux_warp}
64
+ warp ref cat : ${ params.ref_catalogue}
62
65
minotor src : ${ params.use_monitoring_src_file} / ${ params.monitoring_src_file}
63
66
region file : ${ params.use_region_file} / ${ params.region_file}
64
67
output to : ${ params.output_dir}
@@ -149,7 +152,7 @@ process initial_sfind {
149
152
script:
150
153
"""
151
154
echo ${ task.process} on \$ {HOSTNAME}
152
- aegean --cores ${ task.cpus } -- background *_bkg.fits --noise *_rms.fits --table ${ image} ${ region_command} ${ image}
155
+ aegean --background *_bkg.fits --noise *_rms.fits --table ${ image} ${ region_command} ${ image}
153
156
ls *.fits
154
157
"""
155
158
}
@@ -197,7 +200,6 @@ process fits_warp {
197
200
suff1= (params. refcat_ra== ' ra' ? ' _1' : ' ' )
198
201
suff2= (params. refcat_ra== ' ra' ? ' _2' : ' ' )
199
202
200
- if (params. warp == true )
201
203
"""
202
204
echo ${ task.process} on \$ {HOSTNAME}
203
205
fits_warp.py --cores ${ task.cpus} --refcat ${ ref_catalogue} --incat ${ basename} _comp.fits \
@@ -208,15 +210,31 @@ process fits_warp {
208
210
--plot
209
211
ls *.fits
210
212
"""
211
- else
213
+ }
214
+
215
+
216
+ process flux_warp {
217
+ label ' warp'
218
+ publishDir params. output_dir, mode: ' copy' , pattern: " *_warped.fits" , enabled: params. keep_epoch_images
219
+
220
+ input:
221
+ tuple val(basename), path(initial_catalogue)
222
+ each ref_catalogue
223
+
224
+ output:
225
+ tuple val(basename), path(" *_warped.fits" )
226
+
227
+ script:
228
+ suff1= (params. refcat_ra== ' ra' ? ' _1' : ' ' )
229
+ suff2= (params. refcat_ra== ' ra' ? ' _2' : ' ' )
230
+
212
231
"""
213
232
echo ${ task.process} on \$ {HOSTNAME}
214
- ln -s ${ basename } .fits ${ basename } _warped .fits
215
- ls * .fits
233
+ match_catalogues ${ initial_catalogue } ${ ref_catalogue } -o matched .fits --ra2 RAJ2000 --dec2 DEJ2000
234
+ flux_warp matched.fits ${ initial_catalogue } -o ${ basename } _flux .fits
216
235
"""
217
236
}
218
237
219
-
220
238
process make_mean_image {
221
239
publishDir params. output_dir, mode: ' copy'
222
240
@@ -569,7 +587,7 @@ workflow {
569
587
bane_raw( image_ch )
570
588
// image_bkg_rms = epoch_label, image_fits, [bkg_fits, rms_fits]
571
589
image_bkg_rms = bane_raw. out
572
- if ( params. warp ) {
590
+ if ( params. fits_warp ) {
573
591
if ( params. ref_catalogue == null ) {
574
592
// No ref catalogue supplied so download default one
575
593
download_gleam_catalogue()
0 commit comments