-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spacewatch cropped images #54
Comments
@araichoor, the good news is that we don't have to open a new firewall port for this, since
@sbailey, please also comment, especially on timing with respect to the pipeline. |
Notes for parsing the Python 3.10.12 (main, Jun 10 2023, 10:51:02) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> r = requests.head('https://varuna.kpno.noirlab.edu/allsky-all/images/cropped/2023/08/13/20230813_002605.jpg')
>>> r.headers
{'Date': 'Mon, 14 Aug 2023 16:11:37 GMT', 'Server': 'Apache/2.4.57 (Fedora Linux) OpenSSL/1.1.1q', 'Last-Modified': 'Sun, 13 Aug 2023 00:26:24 GMT', 'ETag': '"274ff-602c2fef3949c"', 'Accept-Ranges': 'bytes', 'Content-Length': '161023', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive', 'Content-Type': 'image/jpeg'}
>>> import datetime
>>> r.headers['Last-Modified']
'Sun, 13 Aug 2023 00:26:24 GMT'
>>> try:
... utc = datetime.UTC
... except AttributeError:
... # datetime.UTC is in Python 3.11
... import pytz
... utc = pytz.UTC
>>>
>>> datetime.datetime.strptime(r.headers['Last-Modified'], '%a, %d %b %Y %H:%M:%S %Z').replace(tzinfo=utc)
datetime.datetime(2023, 8, 13, 0, 26, 24, tzinfo=<UTC>)
>>> |
Further code snippets. timestamp = int(datetime.strptime(url_time, last_updated_pattern).timestamp())
os.utime(file_name, (timestamp, timestamp)) |
Thanks for looking at this @weaverba137 ! First: oops, sorry, my correct path is Timestamps: What to download: When to download: |
Is there documentation on when spacewatch does their own rollover to a new day? After that rollover would be the best time to download. |
Please ignore the previous question, it's clear they rollover at 00:00 UTC. |
Pre-sneakernet the afterburners are run as a scronjob at 9am each day (this time has varied throughout the years, but this is the current). That is sometimes paused if there were issues on a night, but in smooth operations, it was consistently done by roughly 9:20am or 9:30am pacific time. In sneakernet it is much more variable. |
@sbailey, @araichoor, @akremin, I'd like to revisit this in the near future. Some remaining questions:
|
|
thanks for pushing on this.
2a. how often? => I feel that a daily update would make sense, no? and provided that the occupied disk space is ok, for the sake of simplicity, we could just run that everyday, whether or not we go on sky (i.e. we would download images for few weeks per year where there is no observations but that should be few Gb, so no big deal);
|
Apologies for joining late on this.
AFAIK, there is nothing in the standard automated pipeline that requires these files, but they are a useful debugging tool when the daily QA reveals something odd and Anand checks if a satellite track went through our focal plane. |
@araichoor, do you have any further comments on this? If not, I'll move forward based on @sbailey's last set of comments. |
no, nothing to add, thanks! |
hi @weaverba137: for info, I get today this message when I run my
I re-ran with this |
@araichoor, thank you I noticed that too, but it's simply an expired certificate that we'll have to wait to be fixed. |
If possible, it would be nice if the spacewatch images could be transferred to NERSC.
Note that there is no rush for that.
I use those images to create per-night spacewatch movies of what desi observes.
see the "Per-night spacewatch" tab here: https://data.desi.lbl.gov/desi/users/raichoor/main-status/main-status.html.
For a given night YYYYMMDD, I currently download those images on my laptop from:
https://varuna.kpno.noirlab.edu/allsky-all/images/cropped/$YYYY/$MM/$DD/
and then scp them to:
https://data.desi.lbl.gov/desi/users/raichoor/images/cropped/$YYYY/$MM/$DD/
Technical informations/precisions:
$DESI_ROOT/users/raichoor/images/cropped/2022
, but I didn t downloaded images for Jul.-Aug.);Thanks!
The text was updated successfully, but these errors were encountered: