Re: Saving VisAD Data objects

> > One other thing.  In your recurse method I'd try to avoid:
> >
> >   d[obj.getColumnIndex()][obj.getRowIndex()] = real.getValue();
> >
> > which is making three method calls to set a value in an array.

Bill, I know you've got a bias against this sort of this, BUT...

a) I was looking for a way to deal with sparse arrays in a general manner
b) anything associated with writing a file will be dominated by I/O times;
   this is just a way to give the CPU something to do while it's waiting :-)
c) as I said, I came up with this off the top of my head in about 10 minutes

> > If you map FlatFields to FITS images and tables, you can extract
> > the values from the FlatField as arrays and then shuffle them
> > into the arrays for the images or table without any method calls.
> 
> For index mapping problems like this, you may find the MultiArrayProxy,
> IntMap (ClipMap, SliceMap, TransposeMap, DecimateMap, FlattenMap) framework
> of ucar.multiarry to be of use. This is part of the netcdf distribution.

Thanks, if Steve's *Accessor/*Adapter stuff doesn't work I'll check these
out.


  • 1998 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: