Home »
Public Forums »
archive »
Removing and Replacing Nan values in IDL
Removing and Replacing Nan values in IDL [message #80877] |
Thu, 19 July 2012 06:47 |
adhdunn
Messages: 11 Registered: July 2012
|
Junior Member |
|
|
Hello,
I am working with MODIS Land Surface Temperature and need to clean my data to remove and replace the NaN values. I currently have a little code that I have written to scale the data, convert from Kelvin to Celsius, and average the night and day temp observations, but I am having trouble writing the (probably very simple) lines that will accomplish this last goal of NaN removal.
What I would like to do is to set up some kind of statement where the program looks for any NaN values in 'image1' and checks if the corresponding location in 'image2' also has NaN values.
The next step would be to say if image1 has NaN values, but image2 does not then replace that pixel in image1 with image2. Then you would also do this for image2 replacing with the image1 value. If they both have NaN values you do nothing.
Does this make sense?
If anyone would like to help me I can post my code and give more details.
Any guidance would definitely be appreciated!!
Thank you!
Allisyn
|
|
|
Current Time: Wed Oct 08 11:40:47 PDT 2025
Total time taken to generate the page: 0.00444 seconds