Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/teuben/nemo
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Nov 1, 2023
2 parents 2d87c10 + d61c1a6 commit 66ea20a
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 7 deletions.
59 changes: 59 additions & 0 deletions man/man5/agui.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.TH AGUI 5 "1 November 2023"

.SH "NAME"
AGUI \- tags, usually embedded as a comment in code, to drive a GUI

.SH "DESCRIPTION"
Defines GUI tags
.PP
Since derived from an earlier version of \fItkrun(1l)\fP, sometimes
also referred to a TKRUN V2 format.
.PP
The keyword specification is in three parts on a line:
setting a default keyword value (this will be language specific),
a commented help, and the special #> comment that specifies
the GUI elements, e.g. for csh this would look as follows
for a slider that is allowed to go from 0 to 10 in steps of 0.1, but
with a default of 1.0
.nf

set a=1 # some help on this keyword #> SCALE 0:10:0.1

.fi


.SH "AGUI"
In version 2 of the old tkrun format we have implemented this via a new python based qt (and pySimpleGui) driver.
Here the format can be run via bash, csh and python in the
.nf

key=val # help #> GUI

.fi
specification, but the client software (bash/csh/python/....) is responsible to properly parse the \fIkey=val\fP
command line arguments. Here are the proposed GUI tags with generic key=val/help/agui sections

.nf

in=foo # input file #> IFILE
out=bar # output file #> OFILE
text=hello # some text #> ENTRY
mode=gauss # the mode #> RADIO gauss,newton,leibniz
stats=mean # what to show #> CHECK sum,mean,sigma,skewness,kurtosis
n=3.141592 # the n value #> SCALE 0:10:0.01
k=3.141592 # k, use n #> LINK n

.fi

.SH "SEE ALSO"
wish(1), zenity(1), qtrun(1NEMO)


.SH "AUTHOR"
Peter Teuben

.SH "UPDATE HISTORY"
.nf
.ta +1.5i +5.5i
1-nov-2023 V1.0 documented from qtrun and pythena PJT
.fi
11 changes: 4 additions & 7 deletions src/image/fits/sdinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* 11-dec-2019 PJT mdarray reduction example
* 29-feb-2020 PJT verbose, raw I/O
* 28-sep-2021 PJT better cfitsio usage, report more SDFITS properties
* apr-2023 PJT some mods for the DYSH work
* apr-2023 PJT some mods/clarifications for the DYSH work
*
* Benchmark 6 N2347 files: 2.4" (this is with mom=0 stats)
* dims=5 for NGC5291: 31-35ms (depending in 1 or 3 levels)
Expand Down Expand Up @@ -456,6 +456,7 @@ void nemo_main(void)
dprintf(1,"MODE=3\n");

if (Qraw) ndims = -1;

if (ndims == 0) {

for (k=0; k<ncolcheck; ++k) {
Expand Down Expand Up @@ -513,7 +514,7 @@ void nemo_main(void)
else
dprintf(0,"DATA2 %g %g ... %g (only 1 row)\n",data2[0][0], data2[0][1], data2[0][nchan-1]);
if (blfit >= 0) {
dprintf(0,"BASELINE %d\n",blfit);
dprintf(0,"BASELINE %d (full row)\n",blfit);
for (ii=0; ii<nrows; ii++)
baseline(nchan, NULL, data2[ii], blfit, coeffs, errors);
}
Expand All @@ -533,7 +534,6 @@ void nemo_main(void)

if (mode >= 0 && mode < 5) continue;
dprintf(1,"MODE=5\n");


if (mom >= 0) {
dprintf(0,"Stats\n");
Expand Down Expand Up @@ -574,8 +574,6 @@ void nemo_main(void)
mean_moment(&m), -1.0,
min_moment(&m), max_moment(&m), n_moment(&m));
} // stats



} else if (ndims > 0) { // special processing

Expand Down Expand Up @@ -696,8 +694,7 @@ void nemo_main(void)
} // ndims > 0

fits_close_file(fptr, &status); /* close the file */
fits_report_error(stderr, status); /* print out any error messages */

fits_report_error(stderr, status); /* print out any error messages */

} //for(j) loop over files
}
Expand Down

0 comments on commit 66ea20a

Please sign in to comment.