All,
I have a sh script of the following tune:
function a () { #functionality.. }
function b () { #functionnlity.. }
function check () { # this function checks for env and if all fine call build }
function usage () { #sh usage details }
function build () { #calls either a or b or... (5 Replies)
hi
could anybody please suggest me how to put a function memory for particular user.
say i am a user rao. want have a function foo in memory .
i have done this .typed the function function in the shell it worked for the session.but next time i do login its not there .
i can i have a... (6 Replies)
Hi I have 2 files a.c and a.bak where I changed long to int using awk script.
I want to get the list of functions whose parameters got modified
for eg: fun ( long a, long b ) might be changed to fun ( int a, int b ) (1 Reply)
Hello,
I'm trying to run a program on a directory (traverse sub dirs too) through my csh script. Arrays support in CSH is appalling, something like associative arrays would have helped me do this so much easier.
Anyway, I want to hold some details extracted from the program and then at the... (0 Replies)
Hi,
Please help me with the below situation where I have to handle the parameters passed to a function in a unique way.
Below is the code, which I am trying to execute. I basically want to pass the parameter to a function, where I am trying to get user input into array(s). I want to name... (7 Replies)
Hi
I would like to place in one line output from two functions. Both functions return text with print cmd.
When I place above code in script it will place them in series.
e.g.
1 #/bin/ksh
2
3 function1()
4 {
5 print "My name is"
6 ... (3 Replies)
Hi ,
I have a script which is using a text file as I/P.
I want a code where it reads n lines from this file and pass the parameters to a function and now this script should run in such a way where a function can be called in parallel with different parameters. Please find below my script, it... (1 Reply)
Hi,
I am a beginner in python programming. In my python script have a main function which calls several other functions. The main function gets its input by reading lines from a input text file. I call the main function for every line in input text file through a loop.
def main(line):
var1... (6 Replies)
Discussion started by: ctrld
6 Replies
LEARN ABOUT OPENDARWIN
funimagerowput
funimagerowput(3) SAORD Documentation funimagerowput(3)NAME
FunImageRowPut - put row(s) of an image
SYNOPSIS
#include <funtools.h>
void *FunImageRowPut(Fun fun, void *buf, int rstart, int rstop,
int dim1, int dim2, int bitpix, char *plist)
DESCRIPTION
The FunImageRowPut() routine writes one or more image rows to the specified FITS image file. The first argument is the Funtools handle
returned by FunOpen(). The second buf argument is a pointer to the row data buffer, while the third and fourth arguments specify the
starting and ending rows to write. Valid rows values range from 1 to dim2, i.e., row is one-valued.
The dim1and dim2 arguments that follow specify the dimensions, where dim1 corresponds to naxis1 and dim2 corresponds to naxis2. The bitpix
argument data type of the image and can have the following FITS-standard values:
o 8 unsigned char
o 16 short
o 32 int
o -32 float
o -64 double
For example:
double *drow;
Fun fun, fun2;
... 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
", i, iname);
... process drow ...
if( !FunImageRowPut(fun2, drow, i, i, 64, NULL) )
gerror(stderr, "can't FunImageRowPut: %d %s
", i, oname);
}
...
The data are assumed to be in the native machine format and will automatically be swapped to big-endian FITS format if necessary. This
behavior can be over-ridden with the convert=[true|false] keyword in the plist param list string.
When you are finished writing the image, you should call FunFlush() to write out the FITS image padding. However, this is not necessary if
you subsequently call FunClose() without doing any other I/O to the FITS file.
SEE ALSO
See funtools(7) for a list of Funtools help pages
version 1.4.2 January 2, 2008 funimagerowput(3)