Skip to content
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

Get image stamps via API #29

Open
genghisken opened this issue Jun 1, 2023 · 5 comments
Open

Get image stamps via API #29

genghisken opened this issue Jun 1, 2023 · 5 comments

Comments

@genghisken
Copy link
Collaborator

Is it possible to request the image stamps via the API?

@lukeshingles
Copy link
Owner

See the email I've forwarded to you for the current state of this. We'll need more storage on the server before we can open this up more widely, but it seems like a good feature to have. As soon I get my kilonova paper submitted, I'll dedicate a week or two for adding features to the Atlas server.

@djbrout
Copy link

djbrout commented Aug 9, 2023

I would love this feature as well! Let me know if you need help to implement this.

@lukeshingles
Copy link
Owner

Reposting an answer that I sent by email here, for those interested in API access to images.

The server is not particularly smart about limiting the storage space occupied by these requests at the moment, so I ask that you send a delete command (same as the API Python example) on the image request tasks after you have downloaded their ZIP files, and not have too many completed image tasks on the server at once (say ~20).

For an existing forced photometry task, you can currently trigger downloading of images associated with a forced photometry task by sending a GET request to the task URL followed by 'requestimages', e.g.,

https://fallingstar-data.com/forcedphot/queue/217800/requestimages

When you access the photometry task (217800), you can find the details of this new image task in the imagerequest_task_id and imagerequest_url fields. The image request task will have a result_imagezip_url field for downloading the ZIP file.

It's also possible to create a new image request (not associated with a forced photometry task) in a similar way to a normal request, except that the request_type field should be set to 'IMGZIP'. Let me know if that doesn't work.

@lsmercadante
Copy link

I am trying to do this using the GET request using the task URL followed by 'requestimages' but I am getting an error: 403 Forbidden. I am including the normal headers (with the authorization token) in this request and I am trying to save the difference images as a zip file. Do you know how to get around this error?

@lukeshingles
Copy link
Owner

I am trying to do this using the GET request using the task URL followed by 'requestimages' but I am getting an error: 403 Forbidden. I am including the normal headers (with the authorization token) in this request and I am trying to save the difference images as a zip file. Do you know how to get around this error?

Thanks for the feedback. I've made a server-side change that should hopefully fix the problem. Can you let me know if it works for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants