Scripts / Tonight
Tonight
A quick-look viewer while you image, built on PixInsight’s own tools. Tonight reads your subs from a folder you choose and stacks each filter with PixInsight’s own StarAlignment and ImageIntegration. It shows a palette preview and each sub’s stars, background and tilt, and you flag the subs to leave out. The same window reviews a night’s subs afterwards.
Overview
During a night of imaging the subs pile up in a folder, and you see them one at a time, if at all. Tonight reads them from the folder you choose, on your computer or your network, at an interval you set (every minute by default) or only when you press Add new subs. You watch the picture build through the night: the Hα, OIII and SII stacks, a palette preview, each sub's stars and background against the night's usual values, and per filter what another hour would add.
Tonight is a viewer built on PixInsight's own tools. It registers and stacks with PixInsight's own StarAlignment and ImageIntegration, through their documented interfaces, and contains no registration, integration or calibration code of its own. Build your masters with your usual preprocessing, such as WeightedBatchPreprocessing. Tonight can mark the files of the cloudy, trailed or soft subs you flag, so that your preprocessing leaves them out. The same window reviews subs you already have, the morning after or any time later.
Tonight reads ordinary image files and nothing else: no commands or code. It sends nothing back, opens no network connections and runs no other programs, and your capture device doesn't communicate with PixInsight at all. While another process runs, WBPP included, Tonight waits until it has finished.

Features
A live night
- Reads new subs from the folder you choose, at an interval you set or only when you press Add new subs
- Reads a sub only once its file is complete
- Waits while another process runs, WBPP included
- A work folder for the night, removed when the night ends
Stacks and preview
- Each sub registered with StarAlignment, each filter stacked with ImageIntegration
- Palette Lab's palettes, with your favourites and custom ones; RGB and LRGB for broadband
- Colour cameras give R, G and B stacks; with a duo-band filter, Hα (or SII) and OIII stacks
- Save the stacks as XISF or open them as image windows
Sub quality
- Stars, star size and background of every sub against the night's usual values
- What another hour would add to each filter's signal-to-noise, and the faintest channel
- In a live night, alerts for clouds, soft focus and subs left out
- The night as a strip: one mark per sub, in its filter's colour
Tilt
- Every sub measured with HFD, FWHM or Corner HFD, as in Tilt Doctor
- Corner spread sub by sub, so an adjustment shows in the next subs
- Star map, sharp spot and a diagnosis in the tilt details
Review and flags
- Step through the subs aligned on the stack; hold Space to compare with the stack
- Nine reasons on keys 1 to 9: clouds, guiding, trails, tilt, focus, wind, dew, stray light, other
- Flagged subs are left out of Tonight's stacks (on by default)
- Marks the files: the reasons in the file name, a FLAGGED header keyword, a Flagged folder or a CSV list
After-action review
- The subs of an earlier night, from chosen files or a whole folder
- Flags from before come back from file names, keywords or the Flagged folder
- Tilt on every sub as it is read, or later with Check tilt now
Install
Add the FederAstro repository to PixInsight once. PixInsight then installs Tonight and offers every future update automatically. Everything in it is signed by a Certified PixInsight Developer.
- In PixInsight, open Resources ▸ Updates ▸ Manage Repositories.
- Click Add and paste
https://federastro.com/pixinsight/ - Click OK, then open Resources ▸ Updates ▸ Check for Updates.
- Apply the update and restart PixInsight when it asks.
- Open it from Process ▸ FederAstro ▸ Tonight.
Requirements
- PixInsight
- 1.9.5 or later
- Platforms
- Windows (64-bit) and macOS (Apple silicon)
- Type
- PixInsight module (a viewer window that can stay open all night)
- Inputs
- Subs in FITS or XISF: mono (Hα, OIII, SII, L, R, G, B), colour camera, duo-band filters
- License
- Free
Changelog
Version 0.1.0
- First release in the FederAstro repository, for Windows (64-bit) and macOS (Apple silicon)
- Live nights and after-action reviews in one window
- Stacks, palette preview, sub quality, tilt check, flags and file marks
- Documentation page in PixInsight's Documentation Browser
Credits and license
Tonight is written by afeder (FederAstro). Registration and stacking are PixInsight's own StarAlignment and ImageIntegration processes. The palettes are Palette Lab's: Foraxx is the dynamic narrowband combination by Ludo (ForaxX) of The Coldest Nights; Dreamsplease is the palette shared by Reddit user u/dreamsplease; the Magma palettes are by Mr.Sketchpad (Discord). This product is based on software from the PixInsight project, developed by Pleiades Astrophoto and its contributors (https://pixinsight.com/).