funimagerowget(3)
π funimagerowget(3) π
okay bestie, gather round, because this one is from SAORD Documentation and it's literally about pulling rows out of an image like it's nothing. sit with me. π«Ά
β¨ NAME β¨
FunImageRowGet β get row(s) of an image π
π SYNOPSIS π
#include <funtools.h>
void *FunImageRowGet(Fun fun, void *buf, int rstart, int rstop,
char *plist)
π DESCRIPTION π
so the FunImageRowGet() routine hands you back one or more image rows from the section you specified in a Funtools data file. that's the whole vibe. β¨
now here's the tea on how it builds that array, because it depends on what you fed it:
- if your input data are of type image, the array gets generated by extracting the specified image rows and then binning them according to the specified bin factor. cute, simple. π
- if your input data live in a binary table or a raw event file, then the rows get binned on the columns specified by the
bincols=keyword (using appropriate default columns as needed) β and after all that, the image section and bin factors get applied. periodt. π
let's go through the arguments one by one, no skipping:
- the first argument is the Funtools handle that
FunOpen()gave you. that's your ticket. ποΈ - the second
bufargument is a pointer to a data buffer to fill. and if you passNULL? iconic behaviour, honestly βFunImageGet()will allocate a buffer of the appropriate size for you. no cap. π« - the third and fourth arguments specify the first and last row to retrieve. and listen: rows are counted starting from 1, all the way up to the value of
FUN_YMAX(fun). don't be out here counting from zero, bestie, it's not that kind of party. π - the final
plist(i.e., parameter list) argument is a string containing one or more comma-delimitedkeyword=valueparameters. you can use it to specify the return data type with thebitpix=keyword. and if you don't put that keyword in the plist string? then the data type of the image is the same as the data type of the original input file β or it's of typeintfor FITS binary tables. that's just how it is. π
so if you do supply bitpix=value in the plist string, the data type of the returned image will be one of the supported FITS image data types:
8unsigned char16short32int-32float-64double
here's an example, and yes it's giving main character energy:
double *drow;
Fun fun;
... open files ...
/* get section dimensions */
FunInfoGet(fun, FUN_SECT_DIM1, &dim1, FUN_SECT_DIM2, &dim2, 0);
/* allocate one line's worth */
drow = malloc(dim1*sizeof(double));
/* retrieve and process each input row (starting at 1) */
for(i=1; i <= dim2; i++){
if( !FunImageRowGet(fun, drow, i, i, "bitpix=-64") )
gerror(stderr, "can't FunImageRowGet: %d %s\n", i, iname);
/* reverse the line */
for(j=1; j<=dim1; j++){
... process drow[j-1] ...
}
}
...
ok now the return value, and this part matters: on success, a pointer to the image buffer is returned. (and yes, that will be the same as the second argument, if you didn't passNULLto the latter. see how it all comes back around? π¦) on error,NULLis returned. π
and one last thing, don't scroll past this: note that the considerations described above for specifying binning columns in FunImageGet() also apply to FunImageRowGet(). so if you already know that lore, you're set. iykyk. π
πΈ SEE ALSO πΈ
see funtools(7) for a list of Funtools help pages π§
mwah, that's the whole page, bestie π this was version 1.4.5, dated April 14, 2011 β go forth and get those rows, you absolute icon πβ¨
π¦ where this page comes from
- debian bookworm: libfuntools-dev 1.4.8-1 Β· GPL
- debian trixie: libfuntools-dev 1.4.8-1.1+b2 Β· GPL
- ubuntu jammy: libfuntools-dev 1.4.8-1 Β· GPL
- ubuntu noble: libfuntools-dev 1.4.8-1.1build2 Β· GPL
- ubuntu questing: libfuntools-dev 1.4.8-2
- ubuntu resolute: libfuntools-dev 1.4.8-2build1 Β· GPL
- ubuntu stonking: libfuntools-dev 1.4.8-2build1 Β· GPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms