Skip to content

Instantly share code, notes, and snippets.

@sonkol
Last active July 22, 2024 14:24
Show Gist options
  • Save sonkol/cd6eb7fe3e2b033b9438768a0ebfbbc5 to your computer and use it in GitHub Desktop.
Save sonkol/cd6eb7fe3e2b033b9438768a0ebfbbc5 to your computer and use it in GitHub Desktop.
Download SDO imagery in regular intervals (uses Luxon time library)
date = luxon.DateTime.fromISO("2024");
final = luxon.DateTime.fromISO("2024-04-30");
string = "";
for (;date < final; date = date.plus({minutes: 90})){
Y = date.toFormat("y");
M = date.toFormat("LL");
D = date.toFormat("dd");
h = date.toFormat("HH");
m = date.toFormat("mm");
s = date.toFormat("ss");
string += `https://sdo.gsfc.nasa.gov/assets/img/browse/${Y}/${M}/${D}/${Y+M+D}_${h+m+s}_512_HMIIF.jpg\n`
}
console.log(string);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment