×

INDI Library v1.9.9 Released (30 Nov 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

KStars imagers – help needed

  • Posts: 57
  • Thank you received: 12
While I'm perfectly comfortable with format strings - `man 3 printf` and `man 3 strftime` are familiar references - the world doesn't need another set of application specific "%something" tokens. Taking inspiration from python's string formatting might better, eg.

f"{imagedir}/{target}/{camera}/{filter}/{exposure:.3f}secs/{type}_{timestamp}_{num:04d}.fits" or
"{imagedir}/{target}/{camera}/{filter}/{exposure:.3f}secs/{type}_{timestamp}_{num}.fits".format(**fits_hdr)

You could interpolate pretty much any property from the FITS header, and you wouldn't need to remember what the difference between "%T" vs "%t" means; tokens like "{TEMPERATURE}" "{DATE-OBS}" "{EXPTIME}" are far more obvious.
3 months 3 weeks ago #85353

Please Log in or Create an account to join the conversation.

Time to create page: 0.166 seconds