Re: How to build ASCII File [message #56913 is a reply to message #56838] |
Wed, 21 November 2007 08:38   |
Marshad2
Messages: 15 Registered: July 2007
|
Junior Member |
|
|
On Nov 20, 6:42 pm, Paul van Delst <Paul.vanDe...@noaa.gov> wrote:
> Marsh...@gmu.edu wrote:
>> On Nov 20, 12:19 pm, Marsh...@gmu.edu wrote:
>>> Hi Guys:
>
>>> I tried to make ASCII file for Spectral Response Curves obtained atftp://asapdata.arc.nasa.gov/MASTER/srf/May_03/however, it is not
>>> working. Can someone give suggestions how to build ASCII file for
>>> Spectral Response Curves.
>
>>> Best Regards,
>
>>> Arshad
>
>> Yes, they are ASCII files containing two columns: one is set of
>> wavelengths, and the other the spectral response for that band at each
>> of those wavelengths. Each file has a different set of wavelengths.
>> What I want to do is take the data from different bands, and compile
>> them into one ASCII file, with one wavelength column that contains all
>> the wavelengths from any of the 50 spectral response files, and then
>> one column for each band, containing the spectral responses at each
>> wavelength in the wavelength column. Where a given file does'nt
>> include values for some wavelengths, those wavelengths will end with
>> values of zero for that band in the big ccompiled ASCII file. This is
>> the detail regarding which I need help.
>
> I can't imagine why you'd want to do that, but since I don't know anything about your
> application, off the top of my head I would say you should:
>
> 1) Read all the files through once to get the minimum and maximum wavelengths.
> 2) Select a suitable wavelength interval (I assume it's different for every
> file/channel)
> 3) Create master array to hold SRFs for all wavelengths (for your common grid),
> all channels.
> 4) Loop over input files i=1,N
> 4a) Read channel file #i
> 4b) Interpolate SRF data to your common grid
> 4c) Slot the result into your master array for the i'th channel
> 5) Output master array to file.
>
> cheers,
>
> paulv- Hide quoted text -
>
> - Show quoted text -
Thank you Paul. Let me try it.
Arshad
|
|
|