×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

KStars imagers – help needed

  • Posts: 96
  • Thank you received: 25
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.
1 year 7 months ago #85353

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

Time to create page: 2.651 seconds