Automatic searching of CONCAM archive

The cosmos at our fingertips.
Post Reply
AndyNewsam
Asternaut
Posts: 5
Joined: Fri Sep 24, 2004 1:08 pm
Location: UK
Contact:

Automatic searching of CONCAM archive

Post by AndyNewsam » Fri Sep 24, 2004 1:18 pm

As part of a major UK education project (the National Schools' Observatory) I would like to use the concam images from one or more sites. Basically, I want to develop a script that will automatically "find the image of the sky closest in time to some YYYY:MM:DD-hh:mm:ss (UT)". Since this needs to be automatic, I, unfortunately, cannot just scroll down the list and choose the appropriate link! As far as I can see, what I will have to do is develop some code that sends repeated HTTP requests for, for example:

http://nightskylive.net/ci/ci040921/ci0 ... 35505a.jpg
http://nightskylive.net/ci/ci040921/ci0 ... 35506a.jpg
http://nightskylive.net/ci/ci040921/ci0 ... 35507a.jpg
.....

etc until a match is found (ie a JPEG is returned).

I'm quite happy to do this, but it seems a little inefficient and probably isn't too kind to the nightskylive.net server, so is there another method I have missed (for example, is there a definite set of times to try? Or a list of images in an easily parsable format?).

Thanks in advance for any help!
Andy

TJ
Asternaut
Posts: 4
Joined: Tue Jul 27, 2004 2:29 pm
Location: Houghton, MI

predicting image timestamps

Post by TJ » Fri Sep 24, 2004 2:30 pm

The schedule is predictable, and the filenames used to match that. Images are taken on a sidereal-based schedule. (every 3:56 from midnight). However, it looks like the filenames are off by a second or two for lots of images.

Ideally, the algorithm you'd use is:

stamp = seconds since 00:00:00 GMT
delta = stamp % 236
if(delta > 118) then nearest = stamp + delta - 236
else nearest = stamp - delta

Even with the odd timestamps, this might give you a place to start looking for each pass. Better to go bobbing for a range of 10 seconds than 236.

Thanks,
Dave
Dave Torrey

TJ
Asternaut
Posts: 4
Joined: Tue Jul 27, 2004 2:29 pm
Location: Houghton, MI

Re: predicting image timestamps

Post by TJ » Fri Sep 24, 2004 2:49 pm

Argh... goofed my math.
TJ wrote:stamp = seconds since 00:00:00 GMT
delta = stamp % 236
if(delta > 118) then nearest = stamp + delta - 236
else nearest = stamp - delta

if(delta > 118) then nearest = stamp - delta + 236

That should be better.

Thanks,
Dave
Dave Torrey

tilvi
Ensign
Posts: 83
Joined: Wed Jul 28, 2004 2:20 am
Location: Michigan Tech
Contact:

Re: Automatic searching of CONCAM archive

Post by tilvi » Fri Sep 24, 2004 3:26 pm

AndyNewsam wrote:As part of a major UK education project (the National Schools' Observatory) I would like to use the concam images from one or more sites. Basically, I want to develop a script that will automatically "find the image of the sky closest in time to some YYYY:MM:DD-hh:mm:ss (UT)". Since this needs to be automatic, I, unfortunately, cannot just scroll down the list and choose the appropriate link! As far as I can see, what I will have to do is develop some code that sends repeated HTTP requests for, for example:

http://nightskylive.net/ci/ci040921/ci0 ... 35505a.jpg
http://nightskylive.net/ci/ci040921/ci0 ... 35506a.jpg
http://nightskylive.net/ci/ci040921/ci0 ... 35507a.jpg
.....

etc until a match is found (ie a JPEG is returned).

I'm quite happy to do this, but it seems a little inefficient and probably isn't too kind to the nightskylive.net server, so is there another method I have missed (for example, is there a definite set of times to try? Or a list of images in an easily parsable format?).

Thanks in advance for any help!
Andy
Glad to hear that you are interested in NSL related project. I am not sure what your goals are. But if you are interested in unsing CONCAM data for science, I would suggest you to use FITS files instead of jpg. If you need any help in reading FITS files, I would be glad to help you. Infact there are many utilities available free to download from HEASARC sites.
One can perform many tasks such as addition, subtraction, etc, on FITS files.
The utilities are available here.
http://heasarc.gsfc.nasa.gov/docs/softw ... mples.html
if you need any help in compiling these programs let me know.
Tilvi
Michigan Tech. University, MI.

AndyNewsam
Asternaut
Posts: 5
Joined: Fri Sep 24, 2004 1:08 pm
Location: UK
Contact:

Re: Automatic searching of CONCAM archive

Post by AndyNewsam » Fri Sep 24, 2004 4:02 pm

Thanks for all the help on this one - very useful.
tilvi wrote: Glad to hear that you are interested in NSL related project. I am not sure what your goals are. But if you are interested in unsing CONCAM data for science, I would suggest you to use FITS files instead of jpg. If you need any help in reading FITS files, I would be glad to help you. Infact there are many utilities available free to download from HEASARC sites.
One can perform many tasks such as addition, subtraction, etc, on FITS files.
The utilities are available here.
http://heasarc.gsfc.nasa.gov/docs/softw ... mples.html
if you need any help in compiling these programs let me know.
I do have vague plans to use the FITS data in the future, but this first tool is actually a lot simpler - schools in the UK will be getting their own observations from the Liverpool Telescope on La Pallma (Canaries) and I want to be able to show them a picture of the sky taken at (roughly) the same time as their observation with a little box marking the (approximate) position. So, using the JPEGs will save me a conversion step...

Again, thanks to all!
Cheers
Andy

Post Reply