QuickStart guide
NOIRLab/IPAC/ESA/STScliI/CfA
FITS Liberator
Version 4.0 Image Processing Software
FITS Liberator v4.0 - Quickstart guide
1. Introduction 2. Installation
3. FITS Liberator basics The TABS Area Image Processing Histogram Area Dark Mode Point Info and Plane / Image Selection Scaling
File Options
Other Options Status Bar Scaling Functions
4. The Command Line interface (CLI) Examples
5. Acknowledgments
6. Contact and Support
15 16
18
18
1. Introduction
New to FITS Liberator? If you are a new user of FITS Liberator and you want to know about the basics of image processing and understand the full workflow, we suggest you take a look at the materials developed
e FlTS Liberator Basics instruction video by Robert Hurt
e FiTS Liberator Advanced instruction video by Robert Hurt e Tour of the FITS Liberator Graphical User Interface
Also, the v3 user guide is available at
https://noirlab.edu/public/media/archives/techdocs/pdf/techdocO25.pdf.
2. Installation
Binaries for each operating system can be downloaded from:
https://noirlab.edu/public/products/applications/app001/
You will find the installers for Windows, MacOSX, and Linux. Command-line interface (CLI) is included with the installed version.
a. Windows
FITS Liberator 4 has been tested on Windows 10 64 bit, but it should work in other versions. The installation process is very straightforward and you will get the software running after the install process finished.
Download the installer for Windows, just double-click over the exe downloaded file
ae FITS Liberator Setup
Installing, oe
L é Antivirus Warning: Some antivirus software can show warnings when opening the ™ installer, even Windows SmartScreen. The official downloaded version is perfectly safe
— and thus warnings can be ignored.
* 7!
You can set the path for access to the CLI using this location: C:\Users\{USER}\AppData\Local\Programs\fitsliberator\fitscli\win {USER} is the username that was used during the install process.
Windows version includes a TAB button that allows direct access to a console where the CLI is available.
b. MacOSX
FITS Liberator 4 has been tested on Mojave, Catalina, and Big Sur.
Download the DMG File, double click over the file to mount the image, e050 G@ FITS Liberator 4.0.0
pod
---9
FITS Liberator Applications
Just drag the FL4 Icon to the Applications folder and drop it. You can set the path for access to the CLI using this location: /Applications/FITS Liberator.app/Contents/fitscli/mac/bin
export PATH=$PATH:/Applications/FITS Liberator.app/Contents/fitscli/mac/bin c. Linux
FITS Liberator 4 has been tested on Ubuntu 18.04, 20.04, but there are available binaries for RedHat-based distributions (rom) and other distros (Snap).
Download the deb package, you will need to install the required libraries, libvips, and cfitsio using the commands:
sudo apt install libvips
sudo dpkg -i fitsliberator_4.0.0_amd64.deb
S$ ls
$ sudo dpkg -i fitsliberator 4.0.0 amd64.deb Selecting previously unselected package fitsliberator. i (Reading database ... 190886 files and directories currently installed. ) Preparing to unpack fitsliberator 4.0.0 amd64.deb Unpacking fitsliberator (4.0.0) fitsliberator (4.0.0)
triggers for gnome-menus (3.36.0-1ubuntu1)
triggers for desktop-file-utils (0.24-1ubuntu3)
triggers for mime-support (3.64ubuntul1)
triggers for hicolor-icon-theme (0.17-2)
Libvips: Install Libvips is a must for using FITS Liberator, cfitsio is usually installed as a ™ required package. Some versions require the use of the “universe” repository before
— installing libvips. You can set the path for access to the CLI using this location:
/opt/FITS\ Liberator/fitscli/linux/
export PATH=$PATH:/opt/FITS\ Liberator/fitscli/linux/
3. FITS Liberator basics
FITS Liberator has been designed using two main components:
CLI: This is the Command Line Interface, which does most of the image processing, it runs in the background when the user is working on the visual interface. The CLI can be used to do batch processing of FITS files.
GUI: Is the Graphic User Interface, show the visual processing calling in the background the CLI for doing the processing, those giving to the user the preview of the processing.
a. User Interface (aka the GUI)
The new interface keeps almost the same layout as FL3, some of the functions have been simplified to get a cleaner workspace.
The TABS Area
The TABS allows selection between two work areas, the main area is called “Image Processing’, here you can get a preview of the file to be processed. The TAB “FITS Header” shows the header
of the file in a way that text can be copied for use in another astronomy software.
NOIRLab/IPAC/ESA/STScI/CfA FITS Liberator - dss_plate_finder
ii: Image Processing _ FITS Header Dark Mode € = Current Point Data a Image 1, Plane 1 x 883.0px Y 733.0px Value 22.2 Lul Image Statistics “a Min 21.349500 Mean 22.936000 Max 31064000 Stdev 0.994806
= Scaling (Dynamic Range)
Linear Asinh Pow
Background level
0 ®
Peak level
13941.19151 @
22.00554 26.68908
6 Black level
White level C)
Exponent
0.33333
Apply to Image
Auto Apply
@ Power(background = 0, peak = 13941.192, exponent =0.333
E> Open FITS File
ia Save Bit Depth
16-bit 32-bit
Alpha Channel
Black Transparent @ Options i About
@ Reset parameters
~¥ Flip |lmage Freeze Settings
Mark pixels in preview
~¥) @ Undefined Vv © White clipping ¥ © Black clipping
Image Processing
rl Ld
p »
%*
%C
On the image preview, you will pan the image when clicking & moving, you can use the scroll
Restore the image to the initial size and position
Open the image in full-screen mode
Zoom in to the image
Zoom out to the image
Pick the black level from one pixel in the image
Pick the white level from one pixel in the image
@ Blacklevel 2200554 26.68908 White level «)
function to zoom in and out.
Histogram Area
é& Blacklevel 0.318857 4.81233 White level C) _——— CCC.
—
The histogram area shows the statistics of the image, between the minimum and maximum value of the image points. You can drag the black and white level over the histogram and get a preview
of the image processing result.
You will get color line markers for the Zero, Mean, Background level, and Scaling Peak Level for
the image according, using the colors described below:
Histogram markers ( Read-only )
® Data Zero eo Scaling Background Level ® Data Mean Scaling Peak Level
Dark Mode
This version includes a Dark mode to reduce the light emitted and get an easy way of getting the focus on the image preview during iterations of changes to the image. Use the light/dark mode
switch for setting your preferred style.
Point Info and Plane / Image Selection = Current Point Data
® |mage 1, Plane 1 | oa |
x 1600.0px ¥ 1319.0px Value -0.0
Lul Image Statistics
Mean
Stdev
Use the Combo box for selecting the plane and image available on the FITS file for doing the processing.
X, Y, and Value show the coordinates and value of the point on the image where the cursor is located. Width and Height show the specific dimensions of the current image.
Image Statistics shows the minimum, maximum value, the mean, and the standard deviation as a reference to make it easiest to select the parameters on each iteration.
10
Scaling
= Scaling (Dynamic Range)
Linear Asinh Pow
Background level 0
Peak level 36.2331
Scaled peak bewel
10
Use the scaling controls to set the function and parameters for the image processing. You can check the “Auto Apply” option if you want to Apply the scaling function and parameters each time you change a value.
J ; Auto-Apply: Keep in mind that each time you apply changes to an image the CLI is
‘ =| = called in the background, on very big images it could be faster to keep the Auto-Apply Py
— is function disabled and use the “Apply To Image” button.
11
File Options = Open FITS File
Bit Depth 16-bit 3=932-bit
Alpha Channe
Gy Teor at oe oe ansparent
@ Options
(> Reset parameters
Use the file options for opening and export the processed files.
Use the Open FITS File for choosing the file to be opened, using local files you will get better
performance. Supported extensions are: .FIT, .FITS, .FZ.
# Compressed FZ Files: Unlike version 3, you won't need to rename the FZ file to Fits
~ | -@- file, in fact, if you keep the fz extension the CLI will use CFITSIO funpack to get more --
accurate values for the uncompressed file.
Use the Save button for exporting the final TIFF when you are happy with the preview result. The exported file can be 16 or 32 bits. The undefined values can be saved as black points or as
transparent, this can be selected using the Alpha Channel selector.
The options show information about the marking lines and allow a cache-clearing, releasing disk
space used by previous processing tasks. The About button shows information about the version and the development team.
The Reset Parameters reset the Black Level, White Level, and scaling function/parameters to the
first state after opening the image.
12
Other Options
Mark pixels in preview Undefined White clipping Black clipping
The checkboxes are described below:
- Flip: Flips vertically the image, set to true by default.
- Freeze Setting: Keeps the parameters and scaling function set as the current values even if you open other files.
- Mark Pixels Undefined: Mark in red the pixels that will be exported as Black or Transparent (according to the Alpha Channel selector).
- \Vhite clipping: Mark in green the pixels that will be clipped due to the White level value set.
- Black clipping: Mark in blue the pixels that will be clipped due to the Black level value set.
Status Bar
® Asinh(background = 0, peak = 34.2, scaled peak = 10)
The status bar (to the right bottom) shows the last scaling function applied with the selected parameters.
13
Scaling Functions
This version only has three main scaling functions that can be applied to the image, each function
has its own parameters described below:
- Linear: Apply a linear scaling using the Peak level as the main parameters. - Asinh: Apply an inverse hyperbolic sine using Background level, Peak Level, and Scaled
Peak Level as parameters - Pow: Apply a Power function using Background level, Peak Level, and exponent, the
exponent can be by example 0.5 for doing a square root.
14
4. The Command Line interface (CLI)
This new version of the FITS Liberator includes a Command Line Interface (CLI), thus providing
the ability to process FITS files without using the graphic interface, this can be useful when the
parameters for processing are known or you want to speed up the image processing iteration.
L, --intile arg o, --outTfile arg
;, --Stretch arg
s, --exponent arg
Kk, --backgroundlevel arg -p, --peaklevel arg
5, --scaledpeaklevel arg
), --blacklevel arg
w, --whitelevel arg
, --depth arg
I, --image arg -Z, —-plane arg
F, --flip arg
F, --outTormat arg
gq, --guiet arg
a, --autolevels arg
u, --undeTined arg
-™, --ispreLoader arg }, --bins arg Z, --deepzoom arg
', --progress arg ’ --Tastmode arg
, --Memory arg
FITS Input File
TIFF Output File
Stretch math function (asinh, linear, pow, Log)
(default: Linear)
Power Function exponent (default: 6.5)
Background Level (default: 6)
Peak Level (default: 1)
« Level (default: 100)
vel (default: 6)
white : 4)
Bit depth (8, 16 or 32) (default:
Image index for multi-image files (default: 1)
Plane index for multi-plane images (default: 1)
Flip the image vertically (default: 1)
Output format i=tiff, 2=png (default: 1)
Quiet execution without echo (default: 6)
Autoselect white & black levels using statistics
(default: @
Alpha channel for undefined values
(@=black,1=transparent) (default: @)
Run CLI in preloading mode (used by GUI Only)
(default: 0)
Number of bins for histogram data (used for
preloading) (default: 1000)
Generate deepzoom (used for big images
GUI) (default: 0)
Print umage operation progress
Faster processing (reducing quality)
Y | 1b I
on the
(default: 6) (default:
Max memory usage (default: 2048)
Each parameter can be used with the full name (example: --exponent) or the single letter
(example: -e), the main parameters are described in the next table:
15
Parameter -i, --infile
-O, --outfile -S, --stretch
-k, --backgroundlevel -p, --peaklevel -S, --scaledpeaklevel
-b, --blacklevel
-w, --whitelevel
-|, --image
-Z, --plane
-P, --progress -F, --outformat
-m, --memory
-f, flip
Description
The name of the FITS input file
The name of the TIFF output file (can be PNG too)
Set the scaling function between asinh, linear and power (pow) Set the background level for asinh and power functions.
Set the peak level for linear, power, and asinh functions.
Set the Scaled peak level for the asinh function.
The black level selected, thus clipping pixels on the image below this value.
The white level selected, thus clipping pixels on the image over this value.
The number of the image, 1-n indexed value, 1 is the first image.
The plane to do the processing, 1-n indexed value, 1 is the first plane. Show progress status on each stage of processing, 1=show, 2=hide You can choose the output file format: 1=tiff, 2=png, tiff is the default. Limit the usage of the memory during processing
1 or O value indicating if the image must be flipped vertically, 1=flip, O=keep
Memory usages: The “--memory” parameter allows increase the performance, if you have enough memory setting to higher values make the processing faster, low
values make the CLI use the disk for processing the big image slowing the speed of processing.
Examples
# Linear Stretch
/fits --infile 673nmos.fits --outfile test2.tiff -s linear -e 1 -k 3.71 -p 21.76 -S 10 -b 2.45 -w 37.55
# Power Stretch (1/2)
./fits --infile 673nmos.fits --outfile test3.tiff -s pow -e 0.5 -k 3.71 -p 21.76 -S 10 -b 1.57 -w 6.13
# Asinh(asinh) Stretch, output to PNG, no flip ./fits --infile 673nmos.fits --outfile test4.png -s asinh -e 1 -k 3.71 -p 21.76 -S 10 -b 1.15 -w 2.68 -F 2 -f O # BATCH PROCESSING: Processing multiple FITS files with the same scaling function and parameters # Windows> for %%f in (*.fits) do ( FOR /f "tokens=1,2 delims=." %%a IN ("%%f") do (
fits.exe --infile %%f -o %%a.tiff -s asinh -e 1-k 3.7 -p 26.5 -b 1.2 -w 3.23 -S 10 -u1-F 1
) # Mac & Linux:
for file in *fits; do fits --infile $file -o $file.tiff -s asinh -e 1-k 3.7 -p 26.5 -b 1.2 -w 3.23 -S 10 -u1-F 1;
done
17
5. Acknowledgments
FITS is an abbreviation for Flexible Image Transport System and has been a standard since 1982 and is recognized by the International Astronomical Union.
Version 4.0 is being developed in a partnership between NSF’s NOIRLab, the Infrared Processing and Analysis Center (IPAC Caltech), the European Space Agency (ESA), the Space Telescope Science Institute (STScI) and the Harvard-Smithsonian Center for Astrophysics (CfA).
The NOIRLab/IPAC/ESA/STSclI/CfA FITS Liberator uses NASA's CFITSIO library, Libvips, OpenSeaDragon, ReactJS, ElectronJS, and D3.js.
The team that produced the NOIRLab/IPAC/ESA/STScl/CfA FITS Liberator consists of: Development, CLI and GUI: Juan Fajardo & David Zambrano Lizarazo
Scientific, technical support and testing: Robert Hurt
Technical Project Manager: Javier Enciso
Project Executive: Lars Lindberg Christensen
6. Contact and Support
For support, bug reporting, and ask for new features please send an email to:
fitsliberator@noirlab.edu
Full source code is available at:
e CLI https://gitlab.com/noirlab/fits-liberator-cli e GUI https://gitlab.com/noirlab/fits-liberator-qgui