Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Inside PixInsight
Inside PixInsight
Inside PixInsight
Ebook682 pages3 hours

Inside PixInsight

Rating: 0 out of 5 stars

()

Read preview

About this ebook

PixInsight has taken the astro-imaging world by storm. As the first comprehensive postprocessing platform to be created by astro-imagers for astro-imagers, it has for many replaced other generic graphics editors as the software of choice. PixInsight has been embraced by professionals such as the James Webb (and Hubble) Space Telescope's science imager Joseph DePasquale and Calar Alto's Vicent Peris, as well as thousands of amateurs around the world.

While PixInsight is extremely powerful, very little has been printed on the subject. The first edition of this book broke that mold, offering a comprehensive look into the software’s capabilities. This second edition expands on the several new processes added to the PixInsight platform since that time, detailing and demonstrating each one with a now-expanded workflow. Addressing topics such as PhotometricColorCalibration, Large-Scale Pixel Rejection, LocalNormalization and a host of other functions, this text remains the authoritative guide to PixInsight.

LanguageEnglish
PublisherSpringer
Release dateOct 26, 2018
ISBN9783319976891
Inside PixInsight

Related to Inside PixInsight

Titles in the series (49)

View More

Related ebooks

Astronomy & Space Sciences For You

View More

Related articles

Reviews for Inside PixInsight

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Inside PixInsight - Warren A. Keller

    Part IPreprocessing

    © Springer Nature Switzerland AG 2018

    W. A. KellerInside PixInsightThe Patrick Moore Practical Astronomy Serieshttps://doi.org/10.1007/978-3-319-97689-1_1

    1. Image Evaluation

    Warren A. Keller¹  

    (1)

    Buckhannon, WV, USA

    Warren A. Keller

    Quality deep-sky astrophotographs are achieved by digitally combining the signal present in multiple subexposures (subs). In this manner, inherent noise and other artifacts are attenuated, so that even the weak signal of dim regions becomes strong enough to be displayed and even enhanced. To that end, preprocessing, which can include image calibration, cosmetic correction, debayering, alignment, and image stacking must be performed accurately to ensure best results. In a perfect world, you could forge ahead with these tasks. In the real world however, it’s good practice to evaluate the quality of your exposures before proceeding. While some imperfect subs may contribute to a good result, those with particularly poor attributes such as bad focus or tracking, weak contrast, or artifacts such as excessive airplane and satellite trails, may best be discarded rather than permitted to adversely affect the stacked master file. PixInsight (PI) offers several resources for image evaluation.

    Processes, Scripts, and Explorer Windows

    PI’s tools are divided into two categories: processes and scripts. Processes are hard-coded tools developed primarily by the PTeam and written in the C++ programming language, using the PixInsight Class Library (PCL) framework. Scripts , on the other hand, are open source, and can be edited by an advanced user using the JavaScript language. Although some scripts are products of the PTeam, many are third-party contributions by PI users. Each is available via its respective drop-down menu at the top of the workspace, and together from the View menu’s Explorer Windows/Process Explorer. This window, along with five other Explorer Windows can be opened, moved, or closed according to your preferences. For our first foray into the program, we’ll choose Blink, found in the Process menu’s ImageInspection submenu (Fig. 1.1).

    ../images/337070_2_En_1_Chapter/337070_2_En_1_Fig1_HTML.png

    Fig. 1.1

    At left (white) is the Process Explorer window . Note that Blink is listed alphabetically and available there, as well as from the All Processes menu at right (gray). Any process would also be listed under its specific submenu, in this case, ImageInspection.

    By the way, ‘ImageInspection’ isn’t a typo – most of PI’s functions are named with this conjoined convention (e.g., ImageInspection, AutoHistogram, etc.).

    Blink

    Blink is a digital version of the blink comparator of old, and helps us determine whether to accept or reject exposures based on the quality of their visual appearance (Fig. 1.2). Upon opening, all of Blink’s icons are grayed-out, with the exception of the folder icon at bottom-left. Click once, then navigate to, and choose the images you wish to analyze. Standard file selection conventions such as Ctrl+Click, Shift+Click, and Ctrl+A apply. Images loaded together must have the same geometry. If you used a monochromatic camera, and binned (2×2) the color images, you’ll need to blink them separately from the unbinned (1×1) luminance images. When ready, click Open. You can alternatively drag and drop an entire folder to the process. Blink will load the files and enable the other control icons.

    ../images/337070_2_En_1_Chapter/337070_2_En_1_Fig2_HTML.png

    Fig. 1.2

    Process Blink lets you quickly evaluate the quality of your subframes by displaying them in an adjustable, automatic continuous loop. In this way, problematic data can be easily identified and eliminated

    Process Console

    During image load, something else happens that’s hard to ignore. The Explorer Window that abruptly pops up is called the Process Console. The console is reminiscent of a DOS prompt, and while it may take some getting used to, get used to it, because, although you can delay its appearance, you can’t make it go away completely. Soon, however, it will become a welcome and trusted resource, as it textually reports everything PI is doing in real-time. In this case, it provides minimal information about the files and the total load time. With more complex processes, it provides vital statistics that help the user dial-in that tool’s settings (Fig. 1.3).

    ../images/337070_2_En_1_Chapter/337070_2_En_1_Fig3_HTML.png

    Fig. 1.3

    The Process Console reports the progress of processes and scripts in real-time and other important metrics

    You can increase the delay in milliseconds of the Process Console’s appearance via Edit/Global Preferences/Miscellaneous Process Settings. In many situations, the console will not be displayed if a large enough delay is set.

    STF: ScreenTransferFunction

    In the background is an image window named BlinkScreen (Fig. 1.4). You’ll note that despite the highlighted image’s linear state, its visualization appears as if it had been permanently stretched in a nonlinear fashion. This is a testament to PI’s ScreenTransferFunction (STF) Auto Stretch. Despite the data remaining linear (as captured by the camera), the visualization is superior to most other processing programs. It is this ability to see the data well that enables the user to perform several repair and preparatory functions before any permanent, nonlinear histogram stretch is applied. More on the STF in the next chapter.

    ../images/337070_2_En_1_Chapter/337070_2_En_1_Fig4_HTML.png

    Fig. 1.4

    The blue process window appears on top of the image window behind it. Note the various controls at upper-right and bottom-left of the BlinkScreen window

    If the contrast levels of individual images vary, double-click Blink’s Compute AutoSTF button, second from the top of the dialog, to reset the visualization of the stack.

    Helpful Hint

    An image that initially appears to be very dark generally has excellent contrast and will likely have a good signal-to-noise ratio (SNR) . While you can brighten up the image by resetting the temporary stretch with the Compute AutoSTF button, be aware that images with weaker contrast will then appear washed out.

    You can alternatively apply a nonpermanent, automatic histogram transformation to all of the images by clicking the button at the very top. With the cursor placed in the image window, you can use the mouse’s scroll wheel to zoom in for a closer examination. Hovering the cursor over an area of interest, hold down the Ctrl key while zooming to keep the area centered.

    At this point, you’d be inspecting the field of view for overall quality, and the stars for sharp focus and roundness. With the first image clicked and highlighted, you can blink manually through the file stack, using the mouse’s scroll wheel, the up and down arrow keys of your keyboard, by clicking on file names, or by using the arrows in the gray column at left. These arrows are part of the automated blinker. You can begin automated blinking by clicking the Play Animation button or stop it with the pause button. Set the desired interval between images (between 0 and 5 sec) in the drop-down menu.

    Removing the default checkmark from a file name will exclude it from auto-blink. You can close a highlighted file with the Close Selected Images icon at the bottom of the dialog. Use Ctrl or Shift with a left-click of the mouse (or Ctrl+A) to highlight multiple files beforehand. Use the Close All Images icon to do just that. Blink also has the ability to make a movie of say, a comet (Chap. 22).

    Suggested Workflow

    Here’s a recommended workflow for Blink.

    1.

    As you determine a file unworthy of further consideration, remove the check mark to identify it as bad. Don’t reject an otherwise good-looking image due to an airplane or satellite trail unless you have a more than adequate number of ‘perfect’ images. Should you decide to use it, make a note of the issue for later use.

    2.

    When finished identifying bad files, highlight them in orange (Ctrl or Shift+Click), then click the fifth icon from the bottom-left called Move Selected Files.

    3.

    Select or create a new folder, perhaps naming it ‘Junk.’ Blink will then move the unwanted files to it. Due to safety protocol, you can’t delete files directly from Blink, but you can easily delete the junk folder after the fact.

    Now, only good looking subframes would remain for further analysis. It’s also good practice, especially for imagers who acquire their data remotely, to evaluate calibration frames as well as light frames. This could help avoid using bias or dark frames with light leaks or unevenly illuminated flat frames.

    Before leaving Blink and its BlinkScreen, let’s take a moment to learn a few key features of the PI user interface (UI).

    The Image and Process Windows

    The BlinkScreen window offers several controls: the View Identifier tab at top-left, fitting options at lower-left, and the icons at top-right. When an image window is clicked on, it becomes active, with the color of its border changing from gray to blue.

    Double-clicking the View Identifier tab allows you to change a file’s name. It should be noted that the word View is a term that generally refers to an image open in PI.

    When an Auto Stretch is active, a green vertical line appears in the Identifier tab.

    While you learned that zooming in and out of an image can be accomplished with the mouse’s scroll wheel, the icons at lower-left, offer window fitting options such as Fit View. Zoom also appears in a context menu with other commands, available by right-clicking inside an image window. Very useful is the Alt+P command, which enables the cursor to pan inside an image window. This can also be accomplished by holding down your keyboard’s space bar while dragging with the left mouse button depressed.

    In addition to the standard ‘X’ icon to close an image window, to its left is a plus sign that represents Maximize. The dash and arrow icon to its left is called Shade, and minimizes an image window into a small blue bar. Though that bar can be dragged anywhere in the workspace, ‘unshading’ the process will return the window to its prior, open position. Finally, at far-left is Iconize, and unlike Shade, an icon will sit over-top of another image window and as you’ll see later, can be dragged from one workspace to another (Chap. 14).

    Turning our attention to the Blink process itself, we again find Shade available, as well as Close. In this instance, once automated blinking had begun, shading the process would be ideal for getting it out of the way for a better look at a full-screen image.

    SubframeSelector Script

    Found in the Script menu’s Batch Processing submenu is the SubframeSelector (SFS) script, contributed by PI user Mike Schuster. It’s a powerful way of measuring the attributes of subframes , beyond the visual inspection you performed with Blink. Many imagers will be content to use all of the files that survived Blink, but some may prefer additional information before making a final decision on whether or not to use them (Fig. 1.5).

    ../images/337070_2_En_1_Chapter/337070_2_En_1_Fig5_HTML.png

    Fig. 1.5

    The SubframeSelector script by Mike Schuster can assist in choosing only the highest-quality images for further processing

    The SFS is rather complex, but is fully detailed in its help file. This is available via the Browse Documentation icon at the bottom-left of the script window. We’ll not attempt to cover all of the complexities and capabilities of this script, as it’s one of the more difficult tools to master, but let’s highlight its most salient features.

    1.

    Begin by loading ‘Target’ Subframes – clicking the Add Files button, navigating to, selecting, and opening all of the files you wish to analyze. Although raw files will be used for this example, as you gain experience, using calibrated and cosmetically corrected files will yield a more accurate result.

    2.

    Under System Parameters, enter the image scale of your telescope and camera in arcseconds per pixel (206 × pixel size in μm ÷ focal length in mm) and other pertinent information.

    3.

    If the default Star Detection and Fitting settings are inadequate, the console will report failures. These settings can be altered in the section of the same name, allowing the script to run successfully. Note too, that a region of the images may be subframed to expedite the result.

    If the stars are faint or the background is bright, decrease the Log (detection sensitivity) slider to between –1.5 and –2.

    You can also increase the Star Peak Response to 0.9.

    If the stars are out of round, try decreasing Maximum Star Distortion to 0.3.

    4.

    Click Measure, and the Process Console will appear as the script does its calculations.

    Table

    In the Table section at the bottom of the dialog, the script reports its findings in tabular form. Note under Sort Table By, you can change the field of interest, and whether results are displayed in ascending or descending order. If you wanted to prioritize criteria based on the images’ SNR , choose SNRWeight, and Descending. The file at the top of the list would have the highest SNR reading – a good thing. Say you were prioritizing based on the Full Width at Half Maximum (FWHM) of the stars in the images. Choosing FWHM and Descending, the file at the top of the list would have the highest FWHM value – a bad thing. You might therefore switch to ascending order, placing the file with the smallest/best FWHM on top to make that category easier to read.

    Plots

    Below the table is the Plots section – a graphical representation of the measurements. When either the ‘X’ to the left of an image file in the table, or that image’s corresponding dot on the plot is clicked, a dash appears to the left of the file name. These images would then be candidates for moving.

    Output

    As you did with Blink, you can use the script to manually move unwanted files that don’t pass muster. Highlighting the undesired files in the Table, drop to the Output section, and specify the parameters for the move. In this case, choose the Rejected Action of Move, and create a Rejected Directory named ‘Junk.’ Clicking Output Subframes at the bottom of the dialog, the script will, by default, add a postfix (suffix) of ‘_x’ to the rejected file names, moving them to the junk folder for subsequent deletion.

    Advanced users can enter a formula into Expressions/Approval, with conditions that will either approve or reject subframes automatically (click the Edit button for assistance). With an expression in place, specify an Approved Directory, and choose Move as the Approved Action (or Copy). Now, do the same for Rejected files. When ready, click Output Subframes.

    Subframe Weighting

    Although factors such as star roundness and FWHM are important, when star quality looks reasonable, an image’s SNR may be the most critical factor for selecting premium subframes.

    Record the names of one or two of the images with the strongest SNRWeight for each monochromatic filter (n/a for one-shot color) . The best of them can be used later as the Reference Image during a manual ImageIntegration (Chap. 6). You could alternatively rename the file something like ‘ReferenceImage’ to make it easier to locate.

    Weighting Expression

    Alternatively, you can use an appropriate expression to assign a specific weight to each measured subexposure based on your chosen criteria. This might include FWHM, in addition to SNRWeight, and even Eccentricity (measure of a star’s roundness). Should you wish to try this method, follow these procedures:

    1.

    Visit https://​www.​springer.​com/​us/​book/​9783319976884 (‘Free Download: Extra Material’ link) to download the SubframeSelector Weighting Expressions.xlsx Excel spreadsheet by David Ault.

    2.

    Enter the Min and Max measurements for the three given parameters as measured by the script, into the blue boxes at the top of the spreadsheet. Set the Range between 40 and 60. The Weight assigned to each of the parameters is up to you, though their total should equal 50. This step can be made easier using a variation of David’s spreadsheet by Brian Valente. Check the PI forum’s Software Development/New Scripts and Modules section to download it.

    3.

    Copy (Ctrl+C) the expression below it in green to the computer’s clipboard.

    4.

    Paste (Ctrl+V) the expression into the Expressions/Weighting field. Useful, less complex expressions are available via the PI Forum.

    5.

    In the Output section, choose the Approved Directory where you want the images to be written to. Make sure that the Approved Action is the default Copy. ‘Move’ won’t work.

    6.

    Near the very bottom is the Weight Keyword field. Type in SFSWEIGHT (SubframeSelector Weight).

    7.

    Click the Output Subframes button.

    The script will write each image’s weight to the SFSWEIGHT field of its XISF (Extensible Image Serialization Format) or FITS (Flexible Image Transport System) header, for later use. We’ll return to harvest the fruits of these labors in Chap. 6.

    Although other image analysis tools exist within the program (Statistics process, etc.), Blink and SFS are the most efficient means of choosing the best images for subsequent processing. For additional excellent information on the SFS script and other topics, visit Kayron Mercieca’s Light Vortex Astronomy tutorials on the World Wide Web.

    SubframeSelector Process

    As of writing, PI community member Cameron Leger is developing a PCL version of the SubframeSelector, which, when complete, will be included in the PI general release (Fig. 1.6). Although the new version will work almost identically to the SFS script, it will have two distinct advantages. Subframe analysis will be accomplished approximately 6x faster than before. Additionally, you’ll be able to open subframes directly from the module for visual inspection, by double-clicking on the file name with the left mouse button.

    ../images/337070_2_En_1_Chapter/337070_2_En_1_Fig6_HTML.png

    Fig. 1.6

    The SubframeSelector process by Cameron Leger will speed up the analysis of subframes

    © Springer Nature Switzerland AG 2018

    W. A. KellerInside PixInsightThe Patrick Moore Practical Astronomy Serieshttps://doi.org/10.1007/978-3-319-97689-1_2

    2. Calibration and Integration

    Warren A. Keller¹  

    (1)

    Buckhannon, WV, USA

    Warren A. Keller

    Combining individual subframes into master files is often referred to as stacking. In PI, this process is called integration, and calibration and alignment must be performed prior to integrating the light frames. Unique to PI is an additional process called CosmeticCorrection that follows calibration, and may be used for best results (Chap. 3).

    For users of one-shot color (OSC) cameras, whether DSLR (Digital Single Lens Reflex) , CCD (Charge-Coupled Device), or CMOS (Complementary Metal Oxide Semiconductor), the additional step of debayering (color conversion) is generally required (Chap. 4).

    When taking a more hands-on track, preprocessing involves up to five separate processes and for many casual imagers this is a lot of work. In 2012, the BatchPreprocessing (BPP) script by Kai Wiechen and Juan Conejero automated the integration process, making it much easier to accomplish. While BPP has some limitations, it’s quite powerful. Like an orchestral conductor, it assembles the individual players and gets them to perform together. Thus, BPP can use the ImageCalibration, CosmeticCorrection, Debayer (for OSC) , StarAlignment, and ImageIntegration processes to get its job done. Though we’ll return to the relative ease afforded by the script (Chap. 7), it’s important to understand the intricacies of the individual players first. There may be times when BPP will prove inadequate for a specific task, and for this reason, being comfortable with the separate modules is essential.

    Calibration

    Images of our subjects are also referred to as light frames (lights). Experienced imagers understand that in addition to the images themselves, calibration frames should also be acquired. Calibration files include bias frames, dark frames, and flat frames. Although some imagers forego some or all of these, in most cases, all are required for an optimal outcome (Fig. 2.1).

    ../images/337070_2_En_2_Chapter/337070_2_En_2_Fig1_HTML.png

    Fig. 2.1

    Calibration files may include bias frames, dark frames, and flat frames. Note the light falloff and dust motes captured by the master flat, the vertical structure in the master bias, and the hot pixels of the master dark

    Helpful Hint

    If you used a monochromatic camera and binned (2×2) the color images, remember to take calibration frames for both bin modes. You’ll need to preprocess the binned data separately from the unbinned (1×1) luminance data in the following steps. See the recommendations for binning in Chap. 5.

    Bias and Dark Frames

    Bias and dark frames are taken in total darkness with the camera or telescope (or camera lens) covered . Both should be taken at the same temperature as the corresponding light frames. CCD and CMOS cameras with regulated cooling make this easy. Users of DSLRs can only approximate this matchup. While the bias frames are taken at the shortest possible exposure time, the dark frames should match or exceed the length of the light exposures. Both biases and darks are portraits of the camera’s inherent electronic signal.

    Just as light frames will be integrated into masters, so must the individual calibration frames be stacked into their respective masters. Since the application of calibration frames actually adds noise to the light frames, it’s imperative to mitigate this effect by using calibration masters consisting of many individual frames. Integrating calibration frames into masters also provides a better statistical sampling of the camera’s electronic output in the absence of any actual photons from astronomical subjects.

    While acquiring calibration frames makes for more work , creating libraries of bias and dark frames saves time, as they can often be reused for many weeks or months, and may be taken at your convenience. Be advised, however, that for maximum accuracy, calibration frames should be as contemporaneous as possible with the light frames.

    Bias

    The bias is a ‘pre-charge’ that’s intentionally applied by the camera to activate the sensor. Because the sensor is imperfect however, the bias value can vary from pixel to pixel. Subtracting the bias signal from the light frames brings all pixels to an equal starting point. It’s generally recommended that 20–50 or more bias frames be acquired. Integrating multiple bias frames will also help reveal and eventually subtract out the majority of a camera’s fixed-pattern noise , generated during sensor readout.

    Dark

    The dark frame contains the bias signal, and also the thermal signal. The thermal signal accounts for the dark current (noise) that builds up over the length of an exposure. Subtracting the thermal signal from the light frames will remove the majority of noise. Acquiring twice as many dark frames as light frames is good practice, and a minimum of 16 to 25 darks should be considered.

    Flat

    A flat frame is a portrait of the optical system . This includes its vignetting properties, expressed as ‘light falloff’ (darkening) at the corners of the sensor, and also the shadows of dust motes that exist in the optical train. The optical train can include many glass surfaces, and the dust on the elements closest to the sensor (cover glass, sensor chamber window, filter, reducer/flattener, etc.) creates the greatest problem – those nasty ‘donuts’ that can obscure the features of your subjects. Because Dust never sleeps and can move around on the optical surfaces, flats should be taken often.

    Unlike the non-illuminated environment of biases and darks, flats are taken in the presence of light. This can be the natural light of dusk or dawn, or the artificial light of EL (electroluminescent) panels or light boxes. An even and diffuse light source is used to create flat frames with an average ADU (Analog to Digital Unit) count of approximately 20,000–40,000 for 16-bit cameras (less for 12 to 14-bit DSLRs and CMOS). Aim for one-third to one-half of the saturation level of your camera. Flats should be taken with the same filter (monochrome cameras) and at the same focal point and rotational angle, as were the light frames . How many flats to take is less clear than other calibration frames. Some imagers use master flats consisting of as few as three or four individual flats per filter, while others advocate a total ADU count of one million (approximately thirty frames [30 × 30 K ADU] for 16-bit cameras) per filter.

    Just as the light frames should be bias and dark subtracted, so should the flats. Due to their relatively short exposures of a bright light source, flats are relatively noise-free, and needn’t match the darks precisely. A master bias frame can therefore be used as what’s called a flat-dark. Some imagers take specific flat-darks that match the exposure time of the flats themselves. As you’ll see, PI recommends a different method than either of these.

    Here’s a general sequence of events performed by typical preprocessing software during image calibration:

    1.

    Bias frames are integrated into a master bias.

    2.

    Dark frames are integrated into a master dark.

    3.

    The master bias is subtracted from the master dark.

    4.

    The master dark is then scaled to the flat frames and the light frames and subtracted.

    5.

    Individual flat frames have either a master bias, a master flat-dark, or a bias-scaled master dark subtracted from them (the latter is the method generally recommended by PI).

    6.

    Flat frames are integrated into a master flat(s).

    7.

    The individual light frames are divided by their respective master flat(s).

    8.

    The light frames are integrated into a master(s).

    With the bias signal, thermal signal, vignetting, and dust mote shadows removed, the lights are ready for further processing, and eventual integration.

    Integration of Bias and Dark Frames

    The procedure for integrating individual biases or darks into master files is the same. Opening the ImageIntegration process from the Process menu, take a moment to examine the dialog (Fig. 2.2). At bottom-left are two icons that appear in many processes. At far-left is the blue New Instance arrow. To its right is a blue circle called Apply Global (F6). Since ImageIntegration is performed with a minimum of three files, you need only concern yourself with the Apply Global option for now. Toward the lower-right corner is the Browse Documentation icon. Go ahead and click it. While this book’s introduction stated that many of PI’s’s tools are not documented, this is an exception – ImageIntegration is fully explained and you’re encouraged to read it. When finished, you have the option to close the document using the double arrows at the bottom-left of the Process Explorer. Remember that you can close the Process Explorer itself if you wish by clicking the ‘X’ at top-right. Returning to the ImageIntegration process dialog, note the Reset icon in the lower-right corner. While many processes have buttons to reset individual settings, the global Reset button that appears in this location for all processes, resets the entire tool to its default settings. Also take a moment to hover your cursor over

    Enjoying the preview?
    Page 1 of 1