comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » strange results from webget
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
strange results from webget [message #82509] Wed, 19 December 2012 14:10 Go to previous message
JP is currently offline  JP
Messages: 55
Registered: April 2008
Member
G'day all,

I am using the webget function from astrolib http://idlastro.gsfc.nasa.gov/ and i am finding some weird things.
This is my example:
If I call webget to retrieve the information from an url like this:
http://thredds0.nci.org.au/thredds/dodsC/u39/modis/lpdaac-mo saics-cmar/v1-hdf4/aust/MOD09A1.005/2004.12.10/MOD09A1.2004. 345.aust.005.b01.500m_0620_0670nm_refl.hdf.gz.ascii?500m_062 0_0670nm_refl[5109:1:5343][7451:1:7472]
If you try that in a browser you'll see it returns meaningful data. (for thos interested that's a small subset of a MODIS reflectance product for Australia).

I try that with webget doing:

url = ' http://thredds0.nci.org.au/thredds/dodsC/u39/modis/lpdaac-mo saics-cmar/v1-hdf4/aust/MOD09A1.005/2004.12.10/MOD09A1.2004. 345.aust.005.b01.500m_0620_0670nm_refl.hdf.gz.ascii?500m_062 0_0670nm_refl[5109:1:5343][7451:1:7472]'

a = webget(url)

so far so good.
However, when i explore the contents of a.text, in a few cases the result doesnt match what you get in your browser. For example:

for i=68, 71 do print, a.text[i]

I get:

[56], 1921, 1980, 1785, 1954, 2078, 2072, 1822, 1822, 1401, 1494, 1494, 1840
2000
, 2218, 2050, 2050, 1798, 1719, 1683, 1808, 1652, 1940, 1703
[57], 1945, 1980, 1921, 1927, 1865, 1865, 1944, 1678, 1290, 1255, 1477, 1901, 1840, 1996, 1916, 1631, 1762, 1756, 1756, 1652, 1652, 1641

that's different from what i expect , looking at the result in my browser which looks:

[56], 1921, 1980, 1785, 1954, 2078, 2072, 1822, 1822, 1401, 1494, 1494, 1840, 2218, 2050, 2050, 1798, 1719, 1683, 1808, 1652, 1940, 1703
[57], 1945, 1980, 1921, 1927, 1865, 1865, 1944, 1678, 1290, 1255, 1477, 1901, 1840, 1996, 1916, 1631, 1762, 1756, 1756, 1652, 1652, 1641

the problem is repeated a few other times.

Any ideas? I know webget uses SOCKET and other things like that, I didn't go that far in exploring where the problem could be in.

Thanks

JP
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: coyote graphics /iso command
Next Topic: Find shift and rotation between two images.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:50:30 PDT 2025

Total time taken to generate the page: 0.00448 seconds