Re: Order of uknown array subscript

From: Tom Page (t.a.page_at_durham.ac.uk)
Date: 02/17/04


Date: Tue, 17 Feb 2004 01:43:48 -0000


/*Sorry - the post should have read*/

Victor

Thanks so much for your response. I am having some troubles with it though.
I have posted my efforts on to a web site to avoid copying large amounts of
code into the message - it's not very long but I thought it would be
cleaner.

http://www.tompagenet.co.uk/fits.php

there are links on the right to my original code (as hinted at in my first
post) and the code that I created after your suggestions. The new code fails
to run, almost certainly because of the:

fits_write_img(fptr, TDOUBLE, fpixel, nelements, array[0][0], &status)

line in the code. This calls an external procedure (one of the CFITSIO
procedures - http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html
for those who are interested).

The trouble is that this appears to expect an array of the form array[0][0]
(which is two dimensional, but then it knows it is three dimensional and
works out the third dimension by using the nelements argument which explains
the total number of elements and thus if you know two dimensions it can
calculate the third.

Should it be of importance, these are the argements both procedures take:
* wldepth - the size of the dynamic array dimension (the other two are of
static size griddef)
* inarray[][griddef][griddef] - the inputed array (basically the data to
write out by the procedure seen above)
* line - a number that simply alters the filename (irrelevant)
* type - ditto (irrelevant)

Thanks for any help with this, it is very much appreciated!

Thanks, Tom



Relevant Pages

  • Re: Record Cleaning Machines
    ... The third dimension being pops and crackles? ... do you have any digitally mastered LPs with your 'third ... To e-mail, change noise into sound. ...
    (uk.rec.audio)
  • Re: Third dimension...
    ... whats to the third dimension? ... Jay Bala. ... What is to the third dimension as a point is to the first dimension and as ...
    (sci.math)
  • Re: Third dimension...
    ... whats to the third dimension? ... Jay Bala. ... What is to the third dimension as a point is to the first dimension and as ...
    (sci.math)
  • Re: johnreed take 14 - 2005
    ... Nice overall response Bill. ... that I believe that the mathematician physicist must take more ... third dimension all things are purely imaginary. ... trajectories of planets the result of a curved space when taken over ...
    (sci.physics.relativity)