Skip to content

Commit

Permalink
Merge branch 'master' into version-142
Browse files Browse the repository at this point in the history
  • Loading branch information
SpheMakh authored Apr 30, 2020
2 parents 0c95cb9 + 743c81d commit 5a51957
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 16 deletions.
2 changes: 1 addition & 1 deletion stimela/cargo/base/aimfast/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ RUN docker-apt-install python3-pip \
python3-numpy

RUN pip3 install --upgrade numpy
RUN pip3 install aimfast==1.0rc3
RUN pip3 install aimfast==1.0rc11
32 changes: 20 additions & 12 deletions stimela/cargo/cab/aimfast/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,21 @@
"dtype": "int"
},
{
"info": "Two tigger model (text/lsm.html) files to compare",
"delimiter": " ",
"name": "compare-models",
"io": "output",
"default": null,
"dtype": "list:file",
"info": "Tigger model (text/lsm.html) files to compare",
"delimiter": " ",
"name": "compare-models",
"io": "output",
"default": null,
"dtype": "list:file",
"required": false
},
{
"info": "Two residual (fits) files to compare. e.g: ['res1.fits:res2.fits']",
"delimiter": " ",
"name": "compare-residuals",
"io": "output",
"default": null,
"dtype": "list:file",
"info": "Residual (fits) files to compare. e.g: ['res1.fits', 'res2.fits']",
"delimiter": " ",
"name": "compare-residuals",
"io": "output",
"default": null,
"dtype": "list:file",
"required": false
},
{
Expand Down Expand Up @@ -170,6 +170,14 @@
"required": false,
"name": "fov-factor",
"dtype": "float"
},
{
"info": "aimfast fidelity results file (JSON format)",
"default": null,
"required": false,
"name": "fidelity-results",
"io": "output",
"dtype": "file"
}
]
}
12 changes: 9 additions & 3 deletions stimela/cargo/cab/aimfast/src/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,15 @@
elif value is False:
continue

if type(value) is list:
args += ['{0}{1} {2}'.format(cab['prefix'], name,
" ".join([val.replace(':output', '') for val in value]))]
if 'compare' in name:
compare = []
for i, val in enumerate(value):
compare.append(val)
# Compare models/images in pairs
if i%2:
args += ['{0}{1} {2}'.format(cab['prefix'],
name, " ".join(compare))]
compare = []
else:
args += ['{0}{1} {2}'.format(cab['prefix'], name, value)]

Expand Down

0 comments on commit 5a51957

Please sign in to comment.