Open mconsidine opened 1 day ago
So...if you look in developer tools, it looks like there is an api at https://spacetelescopelive.org/api/get/hubble
I wonder if it is documented anywhere
I can get the current info from Hubble/Webb via curl like:
curl -H 'endpoint: current' https://spacetelescopelive.org/api/get/hubble | jq .data.observations
curl -H 'endpoint: current' https://spacetelescopelive.org/api/get/webb | jq .data.targets
Interesting. I wrote to them asking about an API and they said they hadn't released or updated one - can't recall which. Thanks - I'll look into it.On Dec 3, 2024 8:21 PM, bguthro @.***> wrote: So...if you look in developer tools, it looks like there is an api at https://spacetelescopelive.org/api/get/hubble I wonder if it is documented anywhere
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Can you help me with this. I do have a space after jq. It still failed it I closed it up.
(ssc-3.12.5) pi@piSeestar:~ $ curl -H 'endpoint: current' https://spacetelescopelive.org/api/get/hubble | jq .data.observations -bash: jq: command not found % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4830 100 4830 0 0 8425 0 --:--:-- --:--:-- --:--:-- 8414 curl: (23) Failed writing body
(ssc-3.12.5) pi@piSeestar:~ $ curl -H 'endpoint: current' https://spacetelescopelive.org/api/get/hubble | jq.data.observations -bash: jq.data.observations: command not found % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4830 100 4830 0 0 7288 0 --:--:-- --:--:-- --:--:-- 7285 curl: (23) Failed writing body
I tested the API. It returns empty strings, so it's just an early harness.
On Wed, Dec 4, 2024, 6:32 AM jeffreypkelly @.***> wrote:
Can you help me with this. I do have a space after jq. It still failed it I closed it up.
(ssc-3.12.5) @.***:~ $ curl -H 'endpoint: current' https://spacetelescopelive.org/api/get/hubble | jq .data.observations -bash: jq: command not found % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4830 100 4830 0 0 8425 0 --:--:-- --:--:-- --:--:-- 8414 curl: (23) Failed writing body
(ssc-3.12.5) @.***:~ $ curl -H 'endpoint: current' https://spacetelescopelive.org/api/get/hubble | jq.data.observations -bash: jq.data.observations: command not found % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4830 100 4830 0 0 7288 0 --:--:-- --:--:-- --:--:-- 7285 curl: (23) Failed writing body
— Reply to this email directly, view it on GitHub https://github.com/smart-underworld/seestar_alp/issues/506#issuecomment-2517609291, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGFJTAW4YIJRDIVDAV43FL32D4G7HAVCNFSM6AAAAABS65RNCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJXGYYDSMRZGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
What's the basic request? To grab the current aim position for either Hubble of Webb and paste into planning page? Or to display current image from them? In either case, wouldn't it be a simple scrapping exercise, without major web tools?
On Wed, Dec 4, 2024, 4:31 PM kai yung @.***> wrote:
I tested the API. It returns empty strings, so it's just an early harness.
On Wed, Dec 4, 2024, 6:32 AM jeffreypkelly @.***> wrote:
Can you help me with this. I do have a space after jq. It still failed it I closed it up.
(ssc-3.12.5) @.***:~ $ curl -H 'endpoint: current' https://spacetelescopelive.org/api/get/hubble | jq .data.observations -bash: jq: command not found % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4830 100 4830 0 0 8425 0 --:--:-- --:--:-- --:--:-- 8414 curl: (23) Failed writing body
(ssc-3.12.5) @.***:~ $ curl -H 'endpoint: current' https://spacetelescopelive.org/api/get/hubble | jq.data.observations -bash: jq.data.observations: command not found % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4830 100 4830 0 0 7288 0 --:--:-- --:--:-- --:--:-- 7285 curl: (23) Failed writing body
— Reply to this email directly, view it on GitHub https://github.com/smart-underworld/seestar_alp/issues/506#issuecomment-2517609291, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGFJTAW4YIJRDIVDAV43FL32D4G7HAVCNFSM6AAAAABS65RNCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJXGYYDSMRZGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
It isn't empty strings. You don't have jq installed.
jq just makes it easier to parse...it isn't required
curl -H 'endpoint: current' https://spacetelescopelive.org/api/get/hubble
{"data":{"id":"01JDXF4DX18T9EXXVX39H1WTY8","createTime":"2024-11-30T02:41:54.593Z","updateTime":null,"observations":[{"id":"01JDWFZCN485RG3XEF7NFBB9J8","scienceInstrument":"WFC3","targetRightAscensionInDegrees":"178.200291666667","targetDeclinationInDegrees":"44.10511111111109","predictedStartTime":"2024-12-05T00:17:14Z","predictedEndTime":"2024-12-05T00:28:42Z"},{"id":"01JDWFZDPQQSZEVRZ44BCQAV3T","scienceInstrument":"WFC3","targetRightAscensionInDegrees":"178.200291666667","targetDeclinationInDegrees":"44.10511111111109","predictedStartTime":"2024-12-05T00:05:12Z","predictedEndTime":"2024-12-05T00:05:43Z"},{"id":"01JDWFZER6PS1QYFD36NMJGK2E","scienceInstrument":"WFC3","targetRightAscensionInDegrees":"178.200291666667","targetDeclinationInDegrees":"44.10511111111109","predictedStartTime":"2024-12-04T23:53:46Z","predictedEndTime":"2024-12-04T23:54:17Z"},{"id":"01JDWFZFCKYBTDYER4G4BEVA63","scienceInstrument":"WFC3","targetRightAscensionInDegrees":"178.200291666667","targetDeclinationInDegrees":"44.10511111111109","predictedStartTime":"2024-12-04T23:41:35Z","predictedEndTime":"2024-12-04T23:53:46Z"}],"proposal":{"id":"01HMA52PRYXXNZS24Q7S1CZTM3","createTime":"2024-01-16T22:08:12.574Z","updateTime":"2024-01-16T22:08:12.814Z","proposalID":"17506","programID":"F8C","title":"Constraining the CSM Interaction Engine in Type II Supernovae","proposalType":{"id":"01GXE1DAWWZCMXHQAAWXQFY5CD","title":"Snapshot","code":"SN"},"proposalTypeList":"SNAP","directSelection":false,"directSelectionType":null,"scientificCategory":{"id":"01HMA4RXN7E92GC7RHQ4H0R2AS","createTime":"2024-01-16T22:02:51.943Z","updateTime":null,"title":"Stellar Physics And Stellar Types"},"secondaryScientificCategory":null,"scientificKeywords":[{"id":"01HMA4RXNHWVK5J97TM4C29D75","createTime":"2024-01-16T22:02:51.953Z","updateTime":null,"title":"Stellar Evolution"},{"id":"01HMA4SC518D3GNN8B6N4NNPYW","createTime":"2024-01-16T22:03:06.785Z","updateTime":null,"title":"Interstellar Dust"},{"id":"01HMA4SM5WB3WF0X3DAS1T20AM","createTime":"2024-01-16T22:03:15.004Z","updateTime":null,"title":"Circumstellar Matter"},{"id":"01HMA4SM62MCP5W2RHE34WFYX3","createTime":"2024-01-16T22:03:15.01Z","updateTime":null,"title":"Supernovae"},{"id":"01HMA4SM68YPBG641409GM0VFV","createTime":"2024-01-16T22:03:15.016Z","updateTime":null,"title":"Massive Stars"}],"instruments":[{"id":"01HAAK849H41KE9V68BK5001BM","title":"Wide Field Camera 3","code":"WFC3","status":"Active"}],"currentlyAllocatedExternalOrbitCount":38,"currentlyAllocatedInternalOrbitCount":0,"currentlyAllocatedParallelOrbitCount":0,"initiallyAllocatedExternalOrbitCount":38,"initiallyAllocatedInternalOrbitCount":0,"initiallyAllocatedParallelOrbitCount":0,"usedExternalOrbitCount":38,"usedInternalOrbitCount":0,"usedParallelOrbitCount":0,"primaryInvestigator":{"id":"01HMA5283QA7QW24EYW8HZAV6K","createTime":"2024-01-16T22:07:57.559Z","updateTime":null,"properID":"26223","orcidID":"","formalName":"Mr. Wynn Vicente Jacobson-Galan","honorific":"Mr.","firstName":"Wynn","middleName":"Vicente","lastName":"Jacobson-Galan","suffix":"","email":"wynnjg@berkeley.edu"},"coInvestigators":[{"id":"01HMA4S2WTWA9X39SCTTC9B9V3","createTime":"2024-01-16T22:02:57.307Z","updateTime":null,"properID":"669","orcidID":"","formalName":"Prof. Alex V. Filippenko","honorific":"Prof.","firstName":"Alex","middleName":"V.","lastName":"Filippenko","suffix":"","email":"alex@astro.berkeley.edu"},{"id":"01HMA4S2X0NP4D5XXPEJ9CM6P5","createTime":"2024-01-16T22:02:57.312Z","updateTime":null,"properID":"7410","orcidID":"http://orcid.org/0000-0002-2445-5275","formalName":"Prof. Ryan Foley","honorific":"Prof.","firstName":"Ryan","middleName":"","lastName":"Foley","suffix":"","email":"foley@ucsc.edu"},{"id":"01HMA4SZ7QY8V4XMP49JF3WX58","createTime":"2024-01-16T22:03:26.327Z","updateTime":null,"properID":"12814","orcidID":"http://orcid.org/0000-0003-2238-1572","formalName":"Dr. Ori Dosovitz Fox","honorific":"Dr.","firstName":"Ori","middleName":"Dosovitz","lastName":"Fox","suffix":"","email":"ofox@stsci.edu"},{"id":"01HMA4SZ825CKC59WRYV29NZYQ","createTime":"2024-01-16T22:03:26.338Z","updateTime":null,"properID":"8496","orcidID":"http://orcid.org/0000-0003-3703-5154","formalName":"Dr. Suvi Gezari","honorific":"Dr.","firstName":"Suvi","middleName":"","lastName":"Gezari","suffix":"","email":"sgezari@stsci.edu"},{"id":"01HMA4SZA84NDE8JCJPZ7GWCYZ","createTime":"2024-01-16T22:03:26.408Z","updateTime":null,"properID":"28559","orcidID":"http://orcid.org/0000-0002-9301-5302","formalName":"Dr. Melissa Shahbandeh","honorific":"Dr.","firstName":"Melissa","middleName":"","lastName":"Shahbandeh","suffix":"","email":"melissa.shahbandeh@gmail.com"},{"id":"01HMA4SZAJCQ2TTJCQVB083QFZ","createTime":"2024-01-16T22:03:26.418Z","updateTime":null,"properID":"21367","orcidID":"http://orcid.org/0000-0003-2445-3891","formalName":"Dr. Matthew Ryan Siebert","honorific":"Dr.","firstName":"Matthew","middleName":"Ryan","lastName":"Siebert","suffix":"","email":"msiebert@stsci.edu"},{"id":"01HMA4SZBAJQ4QRYNPDFTD5TVQ","createTime":"2024-01-16T22:03:26.442Z","updateTime":null,"properID":"26923","orcidID":"","formalName":"Mr. Qinan Wang","honorific":"Mr.","firstName":"Qinan","middleName":"","lastName":"Wang","suffix":"","email":"qwang75@jhu.edu"},{"id":"01HMA4X8YK69QP8SFSZ66G81PA","createTime":"2024-01-16T22:05:14.579Z","updateTime":null,"properID":"40473","orcidID":"http://orcid.org/0000-0002-7706-5668","formalName":"Prof. Ryan Chornock","honorific":"Prof.","firstName":"Ryan","middleName":"","lastName":"Chornock","suffix":"","email":"chornock@berkeley.edu"},{"id":"01HMA4X90Q3ZFSCATAWGWJN7A2","createTime":"2024-01-16T22:05:14.647Z","updateTime":null,"properID":"12874","orcidID":"","formalName":"Dr. Raffaella Margutti","honorific":"Dr.","firstName":"Raffaella","middleName":"","lastName":"Margutti","suffix":"","email":"rafmargutti@gmail.com"},{"id":"01HMA52827C0XCNZYGG5H51B6T","createTime":"2024-01-16T22:07:57.511Z","updateTime":null,"properID":"18894","orcidID":"","formalName":"Dr. Charles Kilpatrick","honorific":"Dr.","firstName":"Charles","middleName":"","lastName":"Kilpatrick","suffix":"","email":"ckilpatrick@northwestern.edu"},{"id":"01HMA52PZHZ4N9D0K64QXX3YYV","createTime":"2024-01-16T22:08:12.785Z","updateTime":null,"properID":"43397","orcidID":"http://orcid.org/0000-0003-0599-8407","formalName":"Dr. Luc Dessart","honorific":"Dr.","firstName":"Luc","middleName":"","lastName":"Dessart","suffix":"","email":"dessart@iap.fr"}]},"targetName":"SN2005AY","isMovingTarget":false,"targetRightAscensionInDegrees":"178.200291666667","targetDeclinationInDegrees":"44.10511111111109","predictedStartTime":"2024-12-04T23:41:35Z","predictedEndTime":"2024-12-05T00:28:42Z","predictedStartTimeInFormatSGOS":"2024.339:23:41:35","predictedEndTimeInFormatSGOS":"2024.340:00:28:42","predictedDurationInSeconds":"2827","executed":false},"_pagination":{"nextRecord":{"id":"01JDXF4DKXPVWD8JA3QHB9DT2C","startTime":"2024-12-05T01:24:38Z","endTime":"2024-12-05T02:11:34Z"},"previousRecord":{"id":"01JDXF4E616GYJ5XQC1RKMQTS6","startTime":"2024-12-04T22:18:42Z","endTime":"2024-12-04T23:05:08Z"}},"_meta":{"code":200,"message":"OK"}}%
curl -H 'endpoint: current' https://spacetelescopelive.org/api/get/webb
{"data":{"id":"01JE4YH7P61441012P2VQYGMBQ","proposal":{"id":"01J56SYK2ZJ36T36Q2MTEZX740","proposalID":"5594","title":"JWST Cluster SLICE - Strong LensIng and Cluster Evolution","proposalType":{"id":"01HH09WQK3F4PD5DR7AN2H1CYZ","title":"Survey programs","code":"SURVEY"},"scientificCategory":{"id":"01HMA4SZ0KXKY223MMNW4HW30A","title":"Large Scale Structure Of The Universe"},"secondaryScientificCategory":{"id":"01HMA4RVZY77N1S0JA23FTBT7B","title":"Galaxies"},"scientificKeywords":[{"id":"01HMA4SZ1D1H5JCJ1M03MGRE12","title":"Galaxy Clusters"},{"id":"01HMA4T26KPPT49G222WK0PG0F","title":"Large-Scale Structure Of The Universe"}],"instruments":[{"id":"01HD719NAW2YEHMRNSTB53QD77","title":"Near-Infrared Camera","code":"NIRCAM"}],"primaryInvestigator":{"id":"01HMA5066Q1202X509S4X6EJRJ","formalName":"Dr. Guillaume Mahler","honorific":"Dr.","firstName":"Guillaume","middleName":"","lastName":"Mahler","suffix":""}},"scheduledStartTime":"2024-12-04T20:40:25Z","scheduledEndTime":"2024-12-04T21:27:23Z","scheduledDurationInSeconds":2818,"scheduledDurationInSecondsFormatted":"46m58s","executionStatus":null,"executedStartTime":null,"executedEndTime":null,"executedDurationInSeconds":null,"executedDurationInSecondsFormatted":null,"boreSightRightAscensionInDegrees":"8.187469255569177","boreSightDeclinationInDegrees":"18.1541552328886","targets":[{"id":"01JE4YH7PA1AH31AE2A33345WV","name":"PSZ2G116.50-44.47","standardName":"","category":"Clusters of Galaxies","type":"FIXED","rightAscensionInDegrees":"8.04555","declinationInDegrees":"18.130575"}]},"_pagination":{"nextRecord":{"id":"01JDWD4FPTMR3ZFQZ9P2TXBYMZ","startTime":"2024-12-05T12:24:24Z","endTime":"2024-12-05T13:24:24Z"},"previousRecord":{"id":"01JDWD4H86GRYXZ7Z0F3K7NJ3E","startTime":"2024-12-04T10:23:39Z","endTime":"2024-12-04T20:40:24Z"}},"_meta":{"code":200,"message":"OK"}}
with jq:
curl -s -H 'endpoint: current' https://spacetelescopelive.org/api/get/hubble | jq .data.observations
[
{
"id": "01JDWFZCN485RG3XEF7NFBB9J8",
"scienceInstrument": "WFC3",
"targetRightAscensionInDegrees": "178.200291666667",
"targetDeclinationInDegrees": "44.10511111111109",
"predictedStartTime": "2024-12-05T00:17:14Z",
"predictedEndTime": "2024-12-05T00:28:42Z"
},
{
"id": "01JDWFZDPQQSZEVRZ44BCQAV3T",
"scienceInstrument": "WFC3",
"targetRightAscensionInDegrees": "178.200291666667",
"targetDeclinationInDegrees": "44.10511111111109",
"predictedStartTime": "2024-12-05T00:05:12Z",
"predictedEndTime": "2024-12-05T00:05:43Z"
},
{
"id": "01JDWFZER6PS1QYFD36NMJGK2E",
"scienceInstrument": "WFC3",
"targetRightAscensionInDegrees": "178.200291666667",
"targetDeclinationInDegrees": "44.10511111111109",
"predictedStartTime": "2024-12-04T23:53:46Z",
"predictedEndTime": "2024-12-04T23:54:17Z"
},
{
"id": "01JDWFZFCKYBTDYER4G4BEVA63",
"scienceInstrument": "WFC3",
"targetRightAscensionInDegrees": "178.200291666667",
"targetDeclinationInDegrees": "44.10511111111109",
"predictedStartTime": "2024-12-04T23:41:35Z",
"predictedEndTime": "2024-12-04T23:53:46Z"
}
]
curl -s -H 'endpoint: current' https://spacetelescopelive.org/api/get/webb | jq .data.targets
[
{
"id": "01JE4YH7PA1AH31AE2A33345WV",
"name": "PSZ2G116.50-44.47",
"standardName": "",
"category": "Clusters of Galaxies",
"type": "FIXED",
"rightAscensionInDegrees": "8.04555",
"declinationInDegrees": "18.130575"
}
]
TY! Works after jq install.
From my point of view, I thought it would be cool to have them as an option for what to image, rather than see what they're doing. Sort of a short cut when your out of ideas. Like you might have a short cut to the messier list for a plan/schedule...On Dec 4, 2024 7:33 PM, smart-underworld @.***> wrote: What's the basic request? To grab the current aim position for either
Hubble of Webb and paste into planning page? Or to display current image
from them? In either case, wouldn't it be a simple scrapping exercise,
without major web tools?
On Wed, Dec 4, 2024, 4:31 PM kai yung @.***> wrote:
I tested the API. It returns empty strings, so it's just an early harness.
On Wed, Dec 4, 2024, 6:32 AM jeffreypkelly @.***>
wrote:
Can you help me with this. I do have a space after jq. It still failed it
I closed it up.
(ssc-3.12.5) @.***:~ $ curl -H 'endpoint: current'
https://spacetelescopelive.org/api/get/hubble | jq .data.observations
-bash: jq: command not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4830 100 4830 0 0 8425 0 --:--:-- --:--:-- --:--:-- 8414
curl: (23) Failed writing body
(ssc-3.12.5) @.***:~ $ curl -H 'endpoint: current'
https://spacetelescopelive.org/api/get/hubble | jq.data.observations
-bash: jq.data.observations: command not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4830 100 4830 0 0 7288 0 --:--:-- --:--:-- --:--:-- 7285
curl: (23) Failed writing body
—
Reply to this email directly, view it on GitHub
https://github.com/smart-underworld/seestar_alp/issues/506#issuecomment-2517609291,
or unsubscribe
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
On one of the discord threads there was a reference to spacetelescopelive.org, a site that shows what Hubble and JWST are currently viewing. Since they don't have an API, I hacked a scraping routine in python. It requires playwright to be installed, which may be a bit heavy. But its required because the pages are dynamically loaded. The results are provided in a way that I think could easily be packaged into a json "goto" call.
It's provided here in the event anyone ever wanted to get at the coordinates without doing lookups.