Commit 353e2ce9 authored by Ole Streicher's avatar Ole Streicher

Merge branch 'upstream' into debian

parents a4ef645d 90f72b37
Version 4.1.7
-------------
Version 4.2.0 (Public release)
------------------------------
* Documentation updates
Version 4.1.8 (Paranal release)
-------------------------------
* Removed ncycles parameter from visir_img_reduce and visir_spc_reduce. It is
still available for visir_util_repack. As it works per nod-cycle it is not
very useful for the full reduction recipes.
* Added planelimit parameter to limit the number planes per nod position which
the pipeline reduces.
* Limited number of planes reduced for imaging science to at most 2000 to
avoid slowing down following shorter reductions.
* Enabled parallel processing of reduction blocks in RBS. This allows e.g.
shorter calibration blocks to not blocked by very long burst mode
reductions.
* Use linearity table in automatic spectroscopy reductions.
* Spectroscopy data is now also jitter corrected which allows using the rr
and rl parameters to better handle extended targets.
* Increased number of reading IO threads to improve performance of reading
compressed files.
* Reduced memory usage of visir_util_repack when receiving very many input
files.
* Improved parallelization depth of coaddition process to better handle the
case of very few very large input files.
Version 4.1.7 (Public release)
------------------------------
* Adapt to new data format written since February 2016.
* Allow reduction of now commissioned Aquarius Burst mode data.
......
......@@ -42,7 +42,7 @@ PRINTER_NAME=lp
PRINT_FONT=Monospaced:16
PRINT_ORIENTATION=P
RADEC_CONVERSION=true
RECIPE_SET=visir_img_reduce=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.1.7/visir_img_reduce.so;visir_spc_reduce=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.1.7/visir_spc_reduce.so;visir_util_repack=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.1.7/visir_util_repack.so;visir_util_img_std_cat=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.1.7/visir_util_img_std_cat.so;visir_util_spc_std_cat=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.1.7/visir_util_spc_std_cat.so;visir_util_spc_txt2fits=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.1.7/visir_util_spc_txt2fits.so
RECIPE_SET=visir_img_reduce=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.2.0/visir_img_reduce.so;visir_spc_reduce=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.2.0/visir_spc_reduce.so;visir_util_repack=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.2.0/visir_util_repack.so;visir_util_img_std_cat=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.2.0/visir_util_img_std_cat.so;visir_util_spc_std_cat=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.2.0/visir_util_spc_std_cat.so;visir_img_dark=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.2.0/visir_img_dark.so;visir_util_spc_txt2fits=/home/quality/pipelines/visir/lib/esopipes-plugins/visir-4.2.0/visir_util_spc_txt2fits.so
SCRIPTS_DIR=gasgano/scripts
SHORTEN_FILES_PATH=true
SHORT_FILENAME=false
......
......@@ -355,6 +355,11 @@ if DPR.CATG like "%CALIB%" and DPR.TECH like "%STATIC_MASK%" and DPR.TECH like
DO.CATG = "STATIC_MASK_SPECTRUM";
}
if DPR.CATG like "%CALIB%" and DPR.TECH like "%LINEARITY_TABLE%" then
{
DO.CATG = "LINEARITY_TABLE";
}
if PRO.CATG == "SPEC_CAL_LINES" then
{
DO.CATG = "SPEC_CAL_LINES";
......@@ -650,7 +655,10 @@ action visir_img_reduce
{
minRet = 0; maxRet = 1;
select file as STATIC_MASK from calibFiles where DO.CATG == "STATIC_MASK_IMAGE";
recipe visir_img_reduce;
/* limit number or reduced planes to avoid long reductions slowing down later shorter reductions */
recipe visir_img_reduce {
"--planelimit=2000";
}
}
action visir_img_reduce_phot
......@@ -685,6 +693,8 @@ minRet = 1; maxRet = 1;
select file as SPEC_CAL_LINES from calibFiles where DO.CATG == "SPEC_CAL_LINES";
minRet = 1; maxRet = 1;
select file as SPEC_CAL_QEFF from calibFiles where DO.CATG == "SPEC_CAL_QEFF";
minRet = 0; maxRet = 1;
select file as LINEARITY_TABLE from calibFiles where DO.CATG == "LINEARITY_TABLE";
recipe visir_spc_reduce;
}
......@@ -725,6 +735,8 @@ minRet = 1; maxRet = 1;
select file as SPEC_CAL_LINES from calibFiles where DO.CATG == "SPEC_CAL_LINES";
minRet = 1; maxRet = 1;
select file as SPEC_CAL_QEFF from calibFiles where DO.CATG == "SPEC_CAL_QEFF";
minRet = 0; maxRet = 1;
select file as LINEARITY_TABLE from calibFiles where DO.CATG == "LINEARITY_TABLE";
recipe visir_spc_reduce;
}
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for VISIR Instrument Pipeline 4.1.7.
# Generated by GNU Autoconf 2.69 for VISIR Instrument Pipeline 4.2.0.
#
# Report bugs to <llundin@eso.org>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='VISIR Instrument Pipeline'
PACKAGE_TARNAME='visir'
PACKAGE_VERSION='4.1.7'
PACKAGE_STRING='VISIR Instrument Pipeline 4.1.7'
PACKAGE_VERSION='4.2.0'
PACKAGE_STRING='VISIR Instrument Pipeline 4.2.0'
PACKAGE_BUGREPORT='llundin@eso.org'
PACKAGE_URL=''
......@@ -1378,7 +1378,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures VISIR Instrument Pipeline 4.1.7 to adapt to many kinds of systems.
\`configure' configures VISIR Instrument Pipeline 4.2.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1449,7 +1449,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of VISIR Instrument Pipeline 4.1.7:";;
short | recursive ) echo "Configuration of VISIR Instrument Pipeline 4.2.0:";;
esac
cat <<\_ACEOF
......@@ -1577,7 +1577,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
VISIR Instrument Pipeline configure 4.1.7
VISIR Instrument Pipeline configure 4.2.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2175,7 +2175,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by VISIR Instrument Pipeline $as_me 4.1.7, which was
It was created by VISIR Instrument Pipeline $as_me 4.2.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3153,7 +3153,7 @@ fi
# Define the identity of the package.
PACKAGE='visir'
VERSION='4.1.7'
VERSION='4.2.0'
cat >>confdefs.h <<_ACEOF
......@@ -14559,7 +14559,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by VISIR Instrument Pipeline $as_me 4.1.7, which was
This file was extended by VISIR Instrument Pipeline $as_me 4.2.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -14625,7 +14625,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
VISIR Instrument Pipeline config.status 4.1.7
VISIR Instrument Pipeline config.status 4.2.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
# Process this file with autoconf to produce a configure script.
AC_INIT([VISIR Instrument Pipeline], [4.1.7], [llundin@eso.org], [visir])
AC_INIT([VISIR Instrument Pipeline], [4.2.0], [llundin@eso.org], [visir])
AC_PREREQ([2.59])
AC_CONFIG_SRCDIR([Makefile.am])
......
......@@ -230,6 +230,8 @@ visir_img_reduce_fill_parameterlist(cpl_parameterlist * self)
continue;
if (strstr(name, "compress"))
continue;
if (strstr(name, "ncycles"))
continue;
cpl_parameterlist_append(self, visir_parameter_duplicate(p));
}
......@@ -344,7 +346,7 @@ run_phot(cpl_recipe * phot, cpl_frameset *photset,
skip_if(0);
cpl_frame_set_tag(imgf, "IM_CAL_PHOT_PREPROCESSED");
cpl_frame_set_tag(imgf, VISIR_IMG_CAL_PHOT_PP);
cpl_frameset_insert(photset, imgf);
cpl_frame_set_tag(wgtf, VISIR_UTIL_WEIGHT_MAP_PROCATG);
cpl_frameset_insert(photset, wgtf);
......@@ -419,7 +421,8 @@ static int visir_img_reduce(cpl_frameset * framelist,
}
skip_if(visir_run_recipe(repack, repackset, parlist,
&util_repack_set_parameters));
meanfrm = cpl_frame_duplicate(cpl_frameset_find(repackset, "MEAN"));
meanfrm = cpl_frame_duplicate(cpl_frameset_find(repackset,
VISIR_UTIL_REPACK_MEAN_PROCATG));
cpl_frameset * shiftset = visir_prepare_frameset(repackset, NULL, 0,
......@@ -433,20 +436,20 @@ static int visir_img_reduce(cpl_frameset * framelist,
shiftset = visir_remove_modified_calib(shiftset);
const char * tagmap[] = {"BEAM_DETECTED", VISIR_UTIL_INPUTS_RAW};
const char * tagmap[] = {VISIR_UTIL_DETECT_SHIFT_PROCATG, VISIR_UTIL_INPUTS_RAW};
cpl_frameset * clipset =
visir_prepare_frameset(shiftset, tagmap, ARRAY_LEN(tagmap), CPL_FALSE);
skip_if(visir_run_recipe(clip, clipset, parlist, &visir_copy_parameters));
const char * qctagmap[] = {"BEAM_DETECTED", VISIR_UTIL_CORRECTED};
const char * qctagmap[] = {VISIR_UTIL_DETECT_SHIFT_PROCATG, VISIR_UTIL_CORRECTED};
cpl_frameset * qcset = visir_prepare_frameset(shiftset, qctagmap,
ARRAY_LEN(qctagmap),
CPL_FALSE);
skip_if(visir_run_recipe(qc, qcset, parlist, &visir_copy_parameters));
const char * swarptagmap[] = {"BEAM_DETECTED", VISIR_UTIL_CORRECTED};
const char * swarptagmap[] = {VISIR_UTIL_DETECT_SHIFT_PROCATG, VISIR_UTIL_CORRECTED};
cpl_frameset * swarpset = visir_prepare_frameset(shiftset, swarptagmap,
ARRAY_LEN(swarptagmap),
CPL_FALSE);
......@@ -474,8 +477,8 @@ static int visir_img_reduce(cpl_frameset * framelist,
qcs = irplib_framelist_new();
cpl_errorstate_set(cleanstate);
}
cpl_frame * coadd_imgf = cpl_frameset_find(swarpset, "COADDED_IMAGE_COMBINED");
cpl_frame * coadd_wgtf = cpl_frameset_find(swarpset, "COADDED_WEIGHT_COMBINED");
cpl_frame * coadd_imgf = cpl_frameset_find(swarpset, VISIR_IMG_COADDED_IMG);
cpl_frame * coadd_wgtf = cpl_frameset_find(swarpset, VISIR_IMG_COADDED_WGT);
skip_if(coadd_imgf == NULL || coadd_wgtf == NULL);
......
......@@ -372,7 +372,7 @@ static int visir_old_img_phot(cpl_frameset * framelist,
if (rawframes == NULL) {
cpl_errorstate_set(cleanstate);
rawframes = irplib_framelist_extract(allframes,
"IM_CAL_PHOT_PREPROCESSED");
VISIR_IMG_CAL_PHOT_PP);
skip_if (rawframes == NULL);
const char * fn =
irplib_frameset_find_file(framelist, VISIR_UTIL_QC_PROCATG);
......@@ -492,7 +492,7 @@ static int visir_old_img_phot(cpl_frameset * framelist,
cpl_msg_info(cpl_func, "Combining the images");
{
const char * pre =
irplib_frameset_find_file(framelist, "IM_CAL_PHOT_PREPROCESSED");
irplib_frameset_find_file(framelist, VISIR_IMG_CAL_PHOT_PP);
if (pre) {
combined = cpl_calloc(2, sizeof(combined[0]));
combined[0] = cpl_image_load(pre, CPL_TYPE_UNSPECIFIED, 0, 0);
......
......@@ -222,6 +222,8 @@ visir_spc_reduce_fill_parameterlist(cpl_parameterlist * self)
continue;
if (strstr(name, "compress"))
continue;
if (strstr(name, "ncycles"))
continue;
cpl_parameterlist_append(self, visir_parameter_duplicate(p));
}
......
......@@ -45,9 +45,6 @@
-----------------------------------------------------------------------------*/
#define RECIPE_STRING "visir_util_detect_shift"
// FIXME:
#define VISIR_UTIL_DETECT_SHIFT_PROCATG "BEAM_DETECTED"
#define VISIR_UTIL_DETECT_SHIFT_TEMPLATE_PROCATG "CORRELATION_TEMPLATE"
#define MAX_BEAMS 4
......@@ -1213,8 +1210,8 @@ cpl_error_code visir_util_detect_shift_one(cpl_frameset * framelist,
skip_if(range == NULL);
if (cpl_frameset_find(framelist, "MEAN")) {
cpl_frame * fn = cpl_frameset_find(framelist, "MEAN");
if (cpl_frameset_find(framelist, VISIR_UTIL_REPACK_MEAN_PROCATG)) {
cpl_frame * fn = cpl_frameset_find(framelist, VISIR_UTIL_REPACK_MEAN_PROCATG);
av = cpl_image_load(cpl_frame_get_filename(fn),
CPL_TYPE_FLOAT, 0,0);
cut_aqu_illuminated(&av);
......@@ -1261,7 +1258,7 @@ cpl_error_code visir_util_detect_shift_one(cpl_frameset * framelist,
/* when beam positions is determined once for all datasets we need to adapt
* for the jitter */
if ((!visir_str_par_is_empty(sbeampos) ||
cpl_frameset_find(framelist, "MEAN")) &&
cpl_frameset_find(framelist, VISIR_UTIL_REPACK_MEAN_PROCATG)) &&
cpl_propertylist_has(mplist, VISIR_DRS_CUMOFFSETXA)) {
double dxa = cpl_propertylist_get_double(mplist, VISIR_DRS_CUMOFFSETXA);
double dya = cpl_propertylist_get_double(mplist, VISIR_DRS_CUMOFFSETYA);
......
......@@ -128,7 +128,7 @@ static int visir_util_join(cpl_frameset * framelist,
"|" VISIR_IMG_PHOT_ONEBEAM_PROCATG
"|" VISIR_IMG_PHOT_COMBINED_PROCATG
"|COADDED_IMAGE"
"|COADDED_IMAGE_COMBINED"
"|" VISIR_IMG_COADDED_IMG
")$",
CPL_FALSE);
......@@ -311,7 +311,7 @@ cpl_error_code visir_util_join_one(cpl_frameset * framelist,
procatg = VISIR_IMG_PHOT_ONEBEAM_PROCATG;
else if (!strcmp(cpl_frame_get_tag(frame), VISIR_IMG_PHOT_COMBINED_PROCATG))
procatg = VISIR_IMG_PHOT_COMBINED_PROCATG;
else if (!strcmp(cpl_frame_get_tag(frame), "COADDED_IMAGE_COMBINED"))
else if (!strcmp(cpl_frame_get_tag(frame), VISIR_IMG_COADDED_IMG))
procatg = VISIR_IMG_OBJ_COMBINED_PROCATG;
else if (!strcmp(cpl_frame_get_tag(frame), "COADDED_IMAGE"))
procatg = VISIR_IMG_OBJ_ONEBEAM_PROCATG;
......
This diff is collapsed.
This diff is collapsed.
......@@ -282,7 +282,9 @@ load_images(cpl_frame * frame, const cpl_mask * bpm)
const char * filename = cpl_frame_get_filename(frame);
cpl_image * img = NULL;
visir_imglist * res = visir_imglist_new(next, NULL);
cpl_propertylist * plist = cpl_propertylist_load_regexp(filename, 0,
"ESO DRS CUMOFFSET.",
CPL_FALSE);
for (int iext = 0; iext < next + 1; iext++) {
cpl_errorstate prestate = cpl_errorstate_get();
......@@ -298,7 +300,7 @@ load_images(cpl_frame * frame, const cpl_mask * bpm)
visir_interpolate_rejected(img, NULL, NULL);
}
visir_imglist_append(res, img, NULL);
visir_imglist_append(res, img, cpl_propertylist_duplicate(plist));
}
end_skip;
......@@ -351,7 +353,8 @@ static cpl_error_code
handle_images(visir_imglist * list, const cpl_image * base,
cpl_size xl, cpl_size yl, cpl_size xh, cpl_size yh,
double phi, double ksi, double eps, double delta,
const visir_data_type dtype)
const visir_data_type dtype,
const visir_spc_resol resol)
{
const cpl_size n = visir_imglist_get_size(list);
const cpl_size nx = cpl_image_get_size_x(visir_imglist_get_img(list, 0));
......@@ -372,8 +375,17 @@ handle_images(visir_imglist * list, const cpl_image * base,
double shift = get_grating_shift(base, img, xl, yl, xh, yh);
visir_spc_det_warp(&img, 1, 0., shift, phi, ksi, eps, delta);
}
else
else {
overscan_correct(img);
if (resol == VISIR_SPC_R_LRP) {
cpl_propertylist * plist = visir_imglist_get_data(list, i);
double dx = cpl_propertylist_get_double(plist,
VISIR_DRS_CUMOFFSETX);
double dy = cpl_propertylist_get_double(plist,
VISIR_DRS_CUMOFFSETY);
visir_spc_det_warp(&img, 1, -dx, -dy, phi, ksi, eps, delta);
}
}
}
end_skip;
......@@ -686,9 +698,9 @@ static int visir_util_undistort(cpl_frameset * framelist,
if (visir_data_is_aqu(data_type))
overscan_correct(base);
skip_if(handle_images(aon, base, xl, yl, xh, yh,
phi, ksi, eps, delta, data_type));
phi, ksi, eps, delta, data_type, resol));
skip_if(handle_images(aoff, base, xl, yl, xh, yh,
phi, ksi, eps, delta, data_type));
phi, ksi, eps, delta, data_type, resol));
}
if (rawframes_b){
cx_list * on_frames = sort_framelist(rawframes_b, "^("
......@@ -719,9 +731,9 @@ static int visir_util_undistort(cpl_frameset * framelist,
}
skip_if(handle_images(bon, base, xl, yl, xh, yh,
phi, ksi, eps, delta, data_type));
phi, ksi, eps, delta, data_type, resol));
skip_if(handle_images(boff, base, xl, yl, xh, yh,
phi, ksi, eps, delta, data_type));
phi, ksi, eps, delta, data_type, resol));
}
if (bkgcorrect && rawframes_a && rawframes_b) {
......@@ -749,8 +761,6 @@ static int visir_util_undistort(cpl_frameset * framelist,
flipped = cpl_image_extract(img, 30, 25, nx - 30, ny - 25);
cpl_image_delete(img);
img = flipped;
/* FIXME: assumes center is in middle */
visir_spc_det_warp(&img, 1, 0., 0., phi, ksi, eps, delta);
}
flipped = visir_spc_flip(img, wlen, resol, data_type);
cpl_image_delete(img);
......@@ -762,7 +772,7 @@ static int visir_util_undistort(cpl_frameset * framelist,
cpl_propertylist_append_double(plist, "ESO QC EXECTIME",
(t_max_filewrite - t_min_obsstart) * 24 * 3600);
save_images(l, framelist, usedframes, plist, parlist);
visir_imglist_delete(l, NULL);
visir_imglist_delete(l, (visir_free)cpl_propertylist_delete);
skip_if(0);
}
else {
......
......@@ -104,10 +104,6 @@ class DataPlotterManager:
fits[category].append(frame.name)
self.fits = fits
del fits['BEAM_DETECTED'][8:]
# stuff is opened on demand
#self.fl.open(fits['BEAM_DETECTED'])
self.templates = []
for f in fits['CORRELATION_TEMPLATE']:
# workaround pyfits <= 2.1.1 unicode issue (CNSHD750437)
......@@ -117,7 +113,7 @@ class DataPlotterManager:
self.templates.extend(pyfits.open(str(f)))
try:
self.mean = pyfits.getdata(fits['MEAN'][0], 0)
self.mean = pyfits.getdata(fits['IMG_REPACKED_MEAN'][0], 0)
except:
self.mean = None
......@@ -227,7 +223,7 @@ class DataPlotterManager:
if self.figure.canvas.HasCapture():
self.figure.canvas.ReleaseMouse()
try:
mheader = pyfits.getheader(self.fits['MEAN'][0], 0)
mheader = pyfits.getheader(self.fits['IMG_REPACKED_MEAN'][0], 0)
pthrow = mheader['ESO TEL CHOP THROW'] / \
float(mheader['ESO INS PFOV'])
except:
......
......@@ -237,7 +237,7 @@ class ReflexBaseGui(wx.App):
def OnInit(self):
respath = os.path.join(os.path.dirname(__file__), 'reflexgui.xrc')
# the same but copied to avoid breakage
# changed global size, filesList size and removed notebook
#respath = os.path.join(os.path.dirname(reflex.__file__),
# 'reflex_interactive_gui.xrc')
self.res = xrc.XmlResource(respath)
......@@ -253,7 +253,6 @@ class ReflexBaseGui(wx.App):
self.ctrlPanel.SetScrollbars(0, 1, 0, 1)
self.ctrlPanel.SetAutoLayout(1)
self.statusBar = xrc.XRCCTRL(self.frame, 'statusBar')
self.parameterNotebook = xrc.XRCCTRL(self.frame, 'parameterNotebook')
self.setDisableCheck = xrc.XRCCTRL(self.frame, 'setDisableCheck')
self.Bind(wx.EVT_BUTTON, self.onCont, id=xrc.XRCID('contBtn'))
......@@ -274,9 +273,12 @@ class ReflexBaseGui(wx.App):
if(not self.io.is_init_sop_enable()):
self.setInitSopCheck.Hide()
self.setFilesInfo()
self.setupParameters()
self.createPlots()
self.setFilesInfo()
# normally triggerd by Collapse but that may not run on start on mac
# which causes broken parameter layout
self.ctrlPanel.FitInside()
self.frame.Show()
return True
......@@ -337,6 +339,7 @@ class ReflexBaseGui(wx.App):
wx.WakeUpIdle()
def onFileInfoPaneChanged(self, event):
self.filesInfo.GetParent().Layout()
self.ctrlPanel.FitInside()
def onItemSelected(self, event):
......@@ -347,7 +350,9 @@ class ReflexBaseGui(wx.App):
wx.TheClipboard.Close()
def setFilesInfo(self):
self.filesInfo.Collapse()
# filesInfo does not get proper class on wxPython3 on macos
if hasattr(self.filesInfo, 'Collapse'):
self.filesInfo.Collapse()
self.filesList.InsertColumn(0, "Category")
self.filesList.InsertColumn(1, "File Name")
self.all_fitsFiles = self.io.inputs.in_sof.files + \
......
......@@ -2,12 +2,12 @@
<resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
<object class="wxFrame" name="ReflexInteractiveWxApp">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>1020,790</size>
<size>1220,790</size>
<title>Reflex Interactive App</title>
<centered>1</centered>
<object class="wxSplitterWindow" name="ctrlandpltSplitter">
<style>wxSP_3D|wxTAB_TRAVERSAL</style>
<sashpos>708</sashpos>
<sashpos>-300</sashpos>
<gravity>1</gravity>
<minsize>3</minsize>
<orientation>vertical</orientation>
......@@ -36,17 +36,6 @@
<border>5</border>
<object class="wxPanel" name="parameterPanel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND|wxALL</flag>
<border>5</border>
<object class="wxNotebook" name="parameterNotebook">
<style>wxTAB_TRAVERSAL</style>
</object>
</object>
</object>
</object>
</object>
</object>
......@@ -147,7 +136,7 @@
<flag>wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</flag>
<border>5</border>
<object class="wxListCtrl" name="filesList">
<size>-1,107</size>
<size>270,107</size>
<style>wxLC_REPORT|wxLC_VRULES|wxLC_SINGLE_SEL|wxLC_HRULES</style>
</object>
</object>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -10,7 +10,7 @@ def percentile(d, q):
return numpy.percentile(d, q)
except AttributeError:
sd = numpy.sort(d.ravel())
return [sd[v / 100. * d.size] for v in q]
return [sd[int(v / 100. * d.size)] for v in q]
def synchronized(tlockname):
......
......@@ -94,6 +94,7 @@ int visir_dfs_set_groups(cpl_frameset * set)
!strcmp(tag, VISIR_IMG_COMBINE_NJ) ||
!strcmp(tag, VISIR_IMG_COMBINE_DJ) ||
!strcmp(tag, VISIR_IMG_CAL_PHOT) ||
!strcmp(tag, VISIR_IMG_CAL_PHOT_PP) ||
!strcmp(tag, VISIR_IMG_CAL_PHOT_BURST) ||
!strcmp(tag, VISIR_IMG_CAL_OBJ) ||
!strcmp(tag, VISIR_IMG_CAL_OBJ_BURST) ||
......@@ -104,6 +105,8 @@ int visir_dfs_set_groups(cpl_frameset * set)
!strcmp(tag, VISIR_IMG_PFOV_BIN) ||
!strcmp(tag, VISIR_IMG_PFOV_TEL) ||
!strcmp(tag, VISIR_IMG_PHOT_RAW) ||
!strcmp(tag, VISIR_IMG_PHOT_COMBINED_PROCATG) ||
!strcmp(tag, VISIR_IMG_COADDED_IMG) ||
!strcmp(tag, VISIR_IMG_PSF_RAW) ||
!strcmp(tag, VISIR_IMG_TRANS_RAW) ||
!strcmp(tag, VISIR_IMG_DARK_RAW) ||
......@@ -116,6 +119,7 @@ int visir_dfs_set_groups(cpl_frameset * set)
!strcmp(tag, VISIR_SPC_PHOT_PP) ||
!strcmp(tag, VISIR_SPC_PHOT_ECH_RAW) ||
!strcmp(tag, VISIR_SPC_PHOT_ECH_PP) ||
!strcmp(tag, VISIR_SPC_OBS_ECH_PP) ||
!strcmp(tag, VISIR_SPC_WCAL_ECH_RAW) ||
!strcmp(tag, VISIR_SPC_WCAL_RAW) ||
!strcmp(tag, VISIR_SPC_FF_RAW) ||
......@@ -134,6 +138,20 @@ int visir_dfs_set_groups(cpl_frameset * set)
!strcmp(tag, VISIR_SAM_OBS_NJ_RAW) ||
!strcmp(tag, VISIR_SAM_OBS_CNJ_RAW) ||
!strcmp(tag, VISIR_CORO_OBS_CNJ_RAW) ||
!strcmp(tag, VISIR_UTIL_QC_PROCATG) ||
!strcmp(tag, VISIR_UTIL_REPACK_MEAN_PROCATG) ||
!strcmp(tag, VISIR_UTIL_REPACK_MEAN_A_PROCATG) ||
!strcmp(tag, VISIR_UTIL_REPACK_MEAN_B_PROCATG) ||
!strcmp(tag, VISIR_UTIL_REPACK_MEAN_A_ON_PROCATG) ||
!strcmp(tag, VISIR_UTIL_REPACK_MEAN_A_OFF_PROCATG) ||
!strcmp(tag, VISIR_UTIL_REPACK_MEAN_B_ON_PROCATG) ||
!strcmp(tag, VISIR_UTIL_REPACK_MEAN_B_OFF_PROCATG) ||
!strcmp(tag, VISIR_UTIL_REPACK_A_ON_PROCATG) ||
!strcmp(tag, VISIR_UTIL_REPACK_A_OFF_PROCATG) ||
!strcmp(tag, VISIR_UTIL_REPACK_B_ON_PROCATG) ||
!strcmp(tag, VISIR_UTIL_REPACK_B_OFF_PROCATG) ||
!strcmp(tag, VISIR_UTIL_DETECT_SHIFT_PROCATG) ||
!strcmp(tag, VISIR_UTIL_DETECT_SHIFT_TEMPLATE_PROCATG) ||
!strcmp(tag, VISIR_UTIL_INPUTS_RAW) ||
!strcmp(tag, VISIR_UTIL_CORRECTED) ||
!strcmp(tag, VISIR_UTIL_NODDED) ||
......
......@@ -94,15 +94,24 @@
#define VISIR_SPC_DARK_COLD_PROCATG "SPEC_DARK_COLD"
#define VISIR_SPC_DARK_DEV_PROCATG "SPEC_DARK_DEV"
#define VISIR_IMG_COADDED_IMG "COADDED_IMAGE_COMBINED"
#define VISIR_IMG_COADDED_WGT "COADDED_WEIGHT_COMBINED"
#define VISIR_IMG_COADDED_CTR "COADDED_CONTRIBUTION_COMBINED"
#define VISIR_UTIL_INPUTS_COMBINED_PROCATG "IMG_COMBINED"
#define VISIR_UTIL_REPACK_A_ON_PROCATG "IMG_REPACKED_A_ON"
#define VISIR_UTIL_REPACK_A_OFF_PROCATG "IMG_REPACKED_A_OFF"
#define VISIR_UTIL_REPACK_MEAN_PROCATG "IMG_REPACKED_MEAN"
#define VISIR_UTIL_REPACK_MEAN_A_PROCATG "IMG_REPACKED_MEAN_A"
#define VISIR_UTIL_REPACK_MEAN_A_ON_PROCATG "IMG_REPACKED_MEAN_A_ON"
#define VISIR_UTIL_REPACK_MEAN_A_OFF_PROCATG "IMG_REPACKED_MEAN_A_OFF"
#define VISIR_UTIL_REPACK_B_ON_PROCATG "IMG_REPACKED_B_ON"
#define VISIR_UTIL_REPACK_B_OFF_PROCATG "IMG_REPACKED_B_OFF"
#define VISIR_UTIL_REPACK_MEAN_B_PROCATG "IMG_REPACKED_MEAN_B"
#define VISIR_UTIL_REPACK_MEAN_B_ON_PROCATG "IMG_REPACKED_MEAN_B_ON"
#define VISIR_UTIL_REPACK_MEAN_B_OFF_PROCATG "IMG_REPACKED_MEAN_B_OFF"
#define VISIR_UTIL_DETECT_SHIFT_PROCATG "BEAM_DETECTED"
#define VISIR_UTIL_DETECT_SHIFT_TEMPLATE_PROCATG "CORRELATION_TEMPLATE"
#define VISIR_UTIL_CONVERT_PROCATG "IMG_CONVERTED"
#define VISIR_UTIL_CONVERT_AUX_PROCATG "AUX_CONVERTED"
#define VISIR_UTIL_UNDISTORT_PROCATG "UNDISTORTED"
......@@ -153,6 +162,7 @@
#define VISIR_IMG_COMBINE_NJ "IM_OBS_NOD_JIT"
#define VISIR_IMG_COMBINE_DJ "IM_OBS_DIR_JIT"
#define VISIR_IMG_CAL_PHOT "IM_CAL_PHOT"
#define VISIR_IMG_CAL_PHOT_PP "IM_CAL_PHOT_PREPROCESSED"
#define VISIR_IMG_CAL_PHOT_BURST "IM_CAL_PHOT_BURST"
#define VISIR_IMG_CAL_OBJ "IM_CAL_OBJECT"
#define VISIR_IMG_CAL_OBJ_BURST "IM_CAL_OBJECT_BURST"
......
......@@ -420,6 +420,22 @@ const char * visir_pfits_get_frame_type(const cpl_propertylist * self)
return visir_pfits_get_string("ESO DET FRAM TYPE");
}
/*----------------------------------------------------------------------------*/
/**
@brief The detector name
@param self property list to read from
@return pointer to statically allocated character string
*/
/*----------------------------------------------------------------------------*/
const char * visir_pfits_get_det_name(const cpl_propertylist * self)
{
if (cpl_propertylist_has(self, "ESO DET NAME")) {
return visir_pfits_get_string("ESO DET NAME");
}
return NULL;
}
/*----------------------------------------------------------------------------*/
/**
@brief The name of grating 1
......
......@@ -97,6 +97,8 @@
#define VISIR_PFITS_STRING_FILTER1 "ESO INS FILT1 NAME"
#define VISIR_PFITS_STRING_FILTER2 "ESO INS FILT2 NAME"
#define VISIR_DRS_CUMOFFSETX "ESO DRS CUMOFFSETX"
#define VISIR_DRS_CUMOFFSETY "ESO DRS CUMOFFSETY"
#define VISIR_DRS_CUMOFFSETXA "ESO DRS CUMOFFSETXA"
#define VISIR_DRS_CUMOFFSETYA "ESO DRS CUMOFFSETYA"
#define VISIR_DRS_CUMOFFSETXB "ESO DRS CUMOFFSETXB"
......@@ -337,6 +339,7 @@ const char * visir_pfits_get_filter(const cpl_propertylist *);
double visir_pfits_get_focus(const cpl_propertylist *);
double visir_pfits_get_exptime(const cpl_propertylist *);
const char * visir_pfits_get_frame_type(const cpl_propertylist *);
const char * visir_pfits_get_det_name(const cpl_propertylist *);
const char * visir_pfits_get_grat1_name(const cpl_propertylist *);
const char * visir_pfits_get_insmode(const cpl_propertylist *);
const char * visir_pfits_get_instrument(const cpl_propertylist *);
......
......@@ -61,6 +61,10 @@
#include <signal.h> /* for sigaction, sigemptyset */
#ifdef _OPENMP
#include <omp.h>
#endif
/* make sure we have fdopen (posix 1990) */
IRPLIB_DIAG_PRAGMA_PUSH_ERR(-Wimplicit-function-declaration)
......@@ -116,17 +120,35 @@ static cpl_boolean visir_mask_has(const cpl_mask *, cpl_binary, int);
/*----------------------------------------------------------------------------*/
size_t visir_get_num_threads(cpl_boolean force)
{
long ret = 1;
FILE * f;
if (force == CPL_FALSE && getenv("OMP_NUM_THREADS")) {
char * endptr, * str = getenv("OMP_NUM_THREADS");
int r = (int)strtol(str, &endptr, 10);
return (str == endptr || r < 1) ? 1 : r;
}
#ifdef _OPENMP
/* respects affinity */
ret = omp_get_max_threads();
#endif
#if defined HAVE_SYSCONF && defined _SC_NPROCESSORS_ONLN
long ret = sysconf(_SC_NPROCESSORS_ONLN);
return ret < 1 ? 1 : ret;
#else
return 1;
ret = sysconf(_SC_NPROCESSORS_ONLN);
#endif
/* simple linux only check for hyperthreading, not useful for visir */
f = fopen("/sys/devices/system/cpu/cpu0/"
"topology/thread_siblings_list", "r");
if (f) {
char buf[80];
if (fread(buf, 1, 80, f) > 0) {
int a, b;
buf[79] = 0;
if (sscanf(buf, "%d,%d", &a, &b) == 2) {
ret /= 2;
}
}
fclose(f);
}
return ret < 1 ? 1 : ret;
}
......@@ -163,6 +185,40 @@ cpl_boolean visir_get_tempdir(char * tmpdir_)
return have_tmpdir;
}
/* ---------------------------------------------------------------------------*/
/**
@brief get the absoluet current working directory
@return char string, must be deleted by the user with cpl_free
*/
/* ---------------------------------------------------------------------------*/
char * visir_get_cwd(void)
{
size_t n = 4096;
char * buf;
errno = 0;
/* if only we could use sane GNU functions instead of this posix crap */
while (1) {
buf = cpl_malloc(n);
if (getcwd(buf, n) != 0) {
break;
}
else if (errno == ERANGE) {
/* increase buffer, repeat */
errno = 0;
n *= 2;