Skip to content

Commit eba6a69

Browse files
authored
Merge pull request #682 from ratt-ru/aimfast_updates
Aimfast updates
2 parents 8db7b47 + c6fd9bd commit eba6a69

5 files changed

Lines changed: 184 additions & 97 deletions

File tree

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
FROM stimela/meqtrees:1.2.0
1+
FROM stimela/meqtrees:1.6.6
22
RUN docker-apt-install python3-pip \
3-
python3-numpy
3+
python3-numpy \
4+
python3-matplotlib \
5+
gfortran \
6+
python-dev \
7+
libboost-all-dev \
8+
libboost-python-dev \
9+
libboost-numpy-dev \
10+
python3-setuptools \
11+
pybdsf
412

5-
RUN pip3 install --upgrade numpy
6-
RUN pip3 install aimfast==1.0rc11
13+
14+
RUN pip3 install bdsf aimfast

stimela/cargo/base/base/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM kernsuite/base:5
1+
FROM kernsuite/base:6
2+
RUN docker-apt-upgrade
23
RUN docker-apt-install \
34
python3-setuptools \
45
libboost-python-dev \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM stimela/base:1.6.0
1+
FROM stimela/base:1.6.6
22
RUN docker-apt-install meqtrees
33
RUN pip install -U pip
44
RUN pip install owlcat scabha

stimela/cargo/cab/aimfast/parameters.json

Lines changed: 164 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,106 @@
11
{
22
"task": "aimfast",
33
"base": "stimela/aimfast",
4-
"tag": "dev",
5-
"description": "An Astronomical Image Fidelity Assessment Tool",
6-
"prefix": "--",
7-
"binary": "aimfast",
4+
"tag": "1.6.6",
5+
"description": "An Astronomical Image Fidelity Assessment Tool",
6+
"prefix": "--",
7+
"binary": "aimfast",
88
"junk":[],
9-
"msdir": false,
9+
"msdir": false,
1010
"parameters": [
1111
{
12-
"info": "Residual image to extract the four (4) statistical moments of distribution",
13-
"name": "residual-image",
14-
"io": "input",
15-
"default": null,
16-
"dtype": "file",
12+
"info": "Residual image to extract the statistical distribution of residual flux",
13+
"name": "residual-image",
14+
"io": "input",
15+
"default": null,
16+
"dtype": "file",
1717
"required": false
18-
},
18+
},
1919
{
20-
"info": "Model lsm.html/text file to extract peak source flux",
21-
"name": "tigger-model",
22-
"io": "input",
23-
"default": null,
24-
"dtype": "file",
20+
"info": "Model caltalog (lsm.html/text) file to extract peak source flux",
21+
"name": "tigger-model",
22+
"io": "input",
23+
"default": null,
24+
"dtype": "file",
2525
"required": false
26-
},
26+
},
2727
{
28-
"info": "Restored image to extract the dynamic range",
29-
"name": "restored-image",
30-
"io": "input",
31-
"default": null,
32-
"dtype": "file",
28+
"info": "Restored image to extract the dynamic range",
29+
"name": "restored-image",
30+
"io": "input",
31+
"default": null,
32+
"dtype": "file",
3333
"required": false
34-
},
34+
},
3535
{
36-
"info": "Source area multiplying factor i.e tot_area = psf-size*af",
37-
"default": 6,
38-
"required": false,
39-
"name": "area-factor",
36+
"info": "Factor to multiply the psf size to get peak source area (tot_area = psf-size*af)",
37+
"default": null,
38+
"required": false,
39+
"name": "area-factor",
4040
"dtype": "int"
41-
},
41+
},
4242
{
43-
"info": "Name of the point spread function file or psf size in arcsec",
44-
"name": "psf",
45-
"io": "input",
46-
"default": null,
43+
"info": "Name of the point spread function file or psf size in arcsec",
44+
"name": "psf",
45+
"io": "input",
46+
"default": null,
4747
"dtype": [
48-
"float",
48+
"float",
4949
"file"
50-
],
51-
"required": false,
50+
],
51+
"required": false,
5252
"mapping": "psf-file"
53-
},
53+
},
5454
{
55-
"info": "Name of model to use for normality testing.",
56-
"name": "normality-test",
57-
"default": null,
58-
"dtype": "str",
59-
"required": false,
55+
"info": "Name of model to use for normality testing.",
56+
"name": "normality-test",
57+
"default": null,
58+
"dtype": "str",
59+
"required": false,
6060
"choices": [
61-
"normaltest",
61+
"normaltest",
6262
"shapiro"
6363
]
64-
},
64+
},
6565
{
66-
"info": "Label",
67-
"dtype": "str",
66+
"info": "Label",
67+
"dtype": "str",
6868
"name": "label"
69-
},
69+
},
7070
{
71-
"info": "Data range to perform normality testing",
72-
"default": null,
73-
"required": false,
74-
"name": "data-range",
71+
"info": "Data range to perform normality testing",
72+
"default": null,
73+
"required": false,
74+
"name": "data-range",
7575
"dtype": "int"
76-
},
76+
},
7777
{
78-
"info": "Tigger model (text/lsm.html) files to compare",
78+
"info": "Source catalog (text/lsm.html) files to compare",
7979
"delimiter": " ",
8080
"name": "compare-models",
8181
"io": "output",
8282
"default": null,
8383
"dtype": "list:file",
8484
"required": false
85-
},
85+
},
86+
{
87+
"info": "List of restored image (fits) files to compare. Note that this will initially run a source finder.",
88+
"delimiter": " ",
89+
"name": "compare-images",
90+
"io": "output",
91+
"default": null,
92+
"dtype": "list:file",
93+
"required": false
94+
},
95+
{
96+
"info": "List of catalog models files to compare with online catalog",
97+
"delimiter": " ",
98+
"name": "compare-online",
99+
"io": "output",
100+
"default": null,
101+
"dtype": "list:file",
102+
"required": false
103+
},
86104
{
87105
"info": "Residual (fits) files to compare. e.g: ['res1.fits', 'res2.fits']",
88106
"delimiter": " ",
@@ -91,19 +109,12 @@
91109
"default": null,
92110
"dtype": "list:file",
93111
"required": false
94-
},
95-
{
96-
"info": "Phase tracking centre of the catalog. e.g: J2000.0,0.0deg,-30.0",
97-
"default": null,
98-
"required": false,
99-
"name": "phase-centre",
100-
"dtype": "str"
101-
},
112+
},
102113
{
103-
"info": "Data points to randomly sample the residual/noise image",
104-
"default": null,
105-
"required": false,
106-
"name": "data-points",
114+
"info": "Data points to randomly sample the residual/noise image",
115+
"default": null,
116+
"required": false,
117+
"name": "data-points",
107118
"dtype": "int"
108119
},
109120
{
@@ -113,6 +124,25 @@
113124
"name": "tolerance",
114125
"dtype": "float"
115126
},
127+
{
128+
"info": "Number of decimal places to round off results",
129+
"default": null,
130+
"required": false,
131+
"name": "decimals",
132+
"dtype": "int"
133+
},
134+
{
135+
"info": "Type of plot for flux comparison of the two catalogs",
136+
"default": null,
137+
"required": false,
138+
"name": "flux-plot",
139+
"dtype": "str",
140+
"choices": [
141+
"log",
142+
"snr",
143+
"inout"
144+
]
145+
},
116146
{
117147
"info": "Get stats of channels with pixel flux above thresh in Jy/Beam",
118148
"default": null,
@@ -128,41 +158,37 @@
128158
"dtype": "str"
129159
},
130160
{
131-
"info": "Window size to compute rms",
161+
"info": "Name of the mask image fits file",
132162
"default": null,
133163
"required": false,
134-
"name": "window-size",
135-
"dtype": "int"
164+
"name": "mask-image",
165+
"io": "input",
166+
"dtype": "file"
136167
},
137168
{
138-
"info": "Step size of sliding window",
169+
"info": "Prefix of output html files",
139170
"default": null,
140171
"required": false,
141-
"name": "step-size",
142-
"dtype": "int"
143-
},
144-
{
145-
"info": "Name of the mask image fits file",
146-
"default": null,
147-
"required": false,
148-
"name": "mask-image",
149-
"io": "input",
150-
"dtype": "file"
172+
"name": "html-prefix",
173+
"dtype": "str"
151174
},
152175
{
153-
"info": "Name of the mask image fits file",
154-
"default": null,
155-
"required": false,
156-
"name": "outfile",
157-
"io": "output",
158-
"dtype": "file"
176+
"info": "Prefix of output catalog file name",
177+
"default": null,
178+
"required": false,
179+
"name": "online-catalog-name",
180+
"dtype": "str"
159181
},
160182
{
161-
"info": "Prefix of output html files",
183+
"info": "Online catalog to compare local image/model.",
162184
"default": null,
163185
"required": false,
164-
"name": "html-prefix",
165-
"dtype": "str"
186+
"name": "online-catalog",
187+
"dtype": "str",
188+
"choices": [
189+
"nvss",
190+
"sumss"
191+
]
166192
},
167193
{
168194
"info": "Factor to multiply the field of view for random points. i.e. 0.0-1.0'",
@@ -172,10 +198,59 @@
172198
"dtype": "float"
173199
},
174200
{
175-
"info": "aimfast fidelity results file (JSON format)",
201+
"info": "Use the closest source only when cross matching sources",
202+
"default": null,
203+
"required": false,
204+
"name": "closest",
205+
"dtype": "bool"
206+
},
207+
{
208+
"info": "Compare all sources irrespective of shape, otherwise only point-like sources are compared",
209+
"default": null,
210+
"required": false,
211+
"name": "all-sources",
212+
"dtype": "bool"
213+
},
214+
{
215+
"info": "Source finder to run if comparing restored images",
216+
"default": null,
217+
"required": false,
218+
"name": "source-finder",
219+
"dtype": "str",
220+
"choices": [
221+
"aegean",
222+
"pybdsf"
223+
]
224+
},
225+
{
226+
"info": "Source finder parameter file",
227+
"default": null,
228+
"required": false,
229+
"name": "config",
230+
"io": "input",
231+
"dtype": "file"
232+
},
233+
{
234+
"info": "Source finder parameter file",
235+
"default": null,
236+
"required": false,
237+
"name": "config",
238+
"io": "input",
239+
"dtype": "file"
240+
},
241+
{
242+
"info": "Input aimfast fidelity results file (JSON format) to get plots",
176243
"default": null,
177244
"required": false,
178245
"name": "fidelity-results",
246+
"io": "input",
247+
"dtype": "file"
248+
},
249+
{
250+
"info": "Name of output file name",
251+
"default": null,
252+
"required": false,
253+
"name": "outfile",
179254
"io": "output",
180255
"dtype": "file"
181256
}

stimela/cargo/cab/aimfast/src/run.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,18 @@
2626
elif value is False:
2727
continue
2828

29-
if 'compare' in name:
29+
if name in ['compare-images', 'compare-residuals', 'compare-models']:
3030
compare = []
3131
for i, val in enumerate(value):
3232
compare.append(val)
3333
# Compare models/images in pairs
3434
if i%2:
3535
args += ['{0}{1} {2}'.format(cab['prefix'],
36-
name, " ".join(compare))]
36+
name, " ".join(compare))]
3737
compare = []
38+
elif name in ['compare-online']:
39+
args += ['{0}{1} {2}'.format(cab['prefix'],
40+
name, " ".join(value))]
3841
else:
3942
args += ['{0}{1} {2}'.format(cab['prefix'], name, value)]
4043

0 commit comments

Comments
 (0)