Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>Pixel Clarity — FITS, ASDF, HDF5 & NumPy image viewerNew to Visual Studio Code? Get it now.
Pixel Clarity — FITS, ASDF, HDF5 & NumPy image viewer

Pixel Clarity — FITS, ASDF, HDF5 & NumPy image viewer

Clarity Orbital Inc.

|
212 installs
| (0) | Free
Astronomy image and catalog viewer: FITS, ASDF (including Roman), HDF5, NumPy and TIFF images, multi-detector mosaics, and CSV, ECSV, Parquet, VOTable and Arrow/Feather tables. Built for Remote-SSH: your data stays on the remote.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pixel Clarity

A fast scientific image viewer for VS Code, built for working on remote machines. It opens FITS, ASDF, HDF5, NetCDF, MATLAB and NumPy files, plus TIFF, PNG, JPEG and Fujifilm raw, as an editor tab, lays out the detectors of a multi-detector exposure as one mosaic, and opens FITS, ECSV, CSV, Parquet, VOTable and Arrow/Feather tables (catalogs, curves, time series) in a table viewer with filtering, statistics and plots.

File formats

  • FITS (.fits, .fit, .fts, .fits.gz, .fits.fz): every HDU, scaled and blank values, cubes and world coordinates. Tile-compressed images (RICE_1, GZIP_1, GZIP_2, NOCOMPRESS) are decompressed as they are read, so large ones stream instead of being unpacked whole.
  • ASDF (.asdf): every array in the tree, listed by path, with units and the tree as searchable metadata. Uncompressed and lz4 blocks stream from disk. World coordinates come from the file's gwcs.
  • HDF5 (.h5, .hdf5, .he5): every dataset, with its attributes.
  • NetCDF-4 (.nc, .nc4): every variable, in groups too, named with its dimensions; a (time, lat, lon) variable is a cube of time steps. CF packing (scale_factor, add_offset), fill and missing values and valid ranges are applied, so values are physical and blanks are blank; units show in the readout, and the variable's and the file's attributes in the header. Grids whose latitude rises show north up. NetCDF-3 classic files aren't supported (nccopy -k nc4 converts them).
  • MATLAB (.mat, saved with -v7.3): numeric and logical variables, and the numeric fields of structs, the way MATLAB shows them (rows and columns as in MATLAB, a 3-D array's planes along its third index). Text, cells, sparse matrices, complex values and objects are listed but not shown. Older MAT-files get a note to save with -v7.3; .mat keeps its usual editor unless you choose Open in Pixel Clarity.
  • NumPy (.npy, .npz): integer, float and bool arrays, compressed or not.
  • TIFF and PNG: 8/16-bit and float, multi-page, color. TIFF opens in Pixel Clarity by default; PNG keeps VS Code's preview unless you choose Open in Pixel Clarity.
  • Fujifilm raw (.raf, uncompressed): X-Trans and Bayer sensors, in color as linear red, green and blue with the black level taken off, plus the untouched sensor frame. No white balance is applied (the camera's as-shot values are in the metadata), so a file opens with the sensor's own color until you balance it. Compressed RAF files aren't supported yet.
  • JPEG (.jpg, .jpeg): color (in RGB, CMYK JPEGs converted) or grayscale, baseline or progressive, turned upright by the EXIF orientation. Decoded whole, up to about 100 megapixels in color. Like PNG, JPEG keeps VS Code's preview unless you choose Open in Pixel Clarity.
  • HiPS (Hierarchical Progressive Surveys, a folder with a properties file): FITS tiles as values, PNG and JPEG tiles in color. Any size opens at once, since only the tiles in view are read. See HiPS.
  • Tables: ECSV, CSV and TSV (also gzipped), with ECSV types, units and metadata, and sniffed delimiters and types for plain CSV; Parquet from astropy, pandas, pyarrow and other writers, with astropy's units, masked and time columns kept. VOTables (.vot, .votable, and .xml VOTables with Open in Pixel Clarity; TABLEDATA, BINARY and BINARY2, also gzipped) with units, descriptions and UCDs; Arrow IPC and Feather v2 (.arrow, .feather, .arrows), LZ4 or ZSTD compressed or not, with categoricals and time zones. 64-bit IDs stay exact. Very large Parquet and Arrow files let you choose which columns to load.
  • FITS tables (binary and ASCII table HDUs, also gzipped): every column type, with scaling, unsigned integers, null values, units and display formats. A complex column becomes a real and an imaginary column, a short vector one column per element, and longer vectors and variable-length arrays are shown as text. A FITS file of tables alone opens in the table viewer; a file with several tables has a chooser, and an image's catalog extension opens from the image viewer's HDU list. Large tables are read in pieces and, like Parquet, let you choose which columns to load.

Features

  • Stretch: linear, log, pow, sqrt, squared, asinh, sinh, histogram equalization and midtone scales; min/max, zscale, percentile or typed limits, which can be locked across slices and reloads.
  • Auto enhance: Auto in the toolbar (or Shift+A) stretches an image for sharing in one click: a dark background, faint structure lifted and bright parts kept. For color images the sky comes out neutral, the channels are balanced and the colors are saturated. Its menu sets the sky brightness, color, warmth and tint; Make this white balances the colors on a star or region; Revert goes back.
  • Mouse and keyboard: right-drag adjusts contrast and bias, the wheel zooms about the pointer, and the arrow keys move the crosshair a pixel at a time.
  • RGB composites: three planes or three files as red, green and blue, each with its own limits (linked by default). Files of different sizes or pointings are aligned through their WCS. Pick R, G or B and the image list sets what that channel shows, so two picks swap red and blue (false color from an infrared camera, say). The % button beside R, G and B mixes the channels: it says what the selected color is made of, an amount of each channel from −100% to +100%, or any value typed in the box, with negative amounts taking a channel away. Mixing changes the picture, not the data, so readouts and measurements stay the file's values. A legend names each channel's file, and a toggle shows the composite only where every channel has data.
  • Colormaps: classic astronomy maps plus matplotlib's perceptual and diverging maps, with invert.
  • Cuts and histogram: row and column cuts aligned with the image, and a histogram with draggable limits and the stretch curve.
  • World coordinates: RA/Dec (or galactic, ecliptic or linear axes) under the cursor, a compass, and plate scale and rotation in the Info panel, from common FITS projections with SIP distortion. Go to (j, or the pin in the toolbar) centers the view on a typed RA and Dec, in degrees or as h:m:s ±d:m:s, and marks the spot; in a mosaic it finds the detector that holds it.
  • Smoothing: the blur button beside the smooth-pixels toggle smooths the picture with a Gaussian (1.5 pixels by default; its menu sets the width) to bring out faint extended light. Only the picture changes: values, readouts and statistics stay the pixels' own. The smoothing is done next to the data, so it costs no more over a slow link, and exports are smoothed the same way.
  • Coordinate grid and scale bar: the grid button in the toolbar draws lines of right ascension and declination (or of the image's galactic or ecliptic coordinates) at a round spacing for the zoom, labelled at the edges, curved as the projection is and right for turned views, mosaics and HiPS; and a scale bar of a round angular length. Exports draw both at their own scale.
  • Sky services: What is this? in the right-click menu lists the SIMBAD objects near a point, and the Aladin Lite panel shows a sky survey around the view, following its pan, zoom and orientation.
  • Catalogs: the catalog button in the toolbar overlays Gaia DR3, 2MASS, SIMBAD or any VizieR table (by its ID, or found by words) over what the view shows, the brightest 2,000 first. Hover a marker for its name, magnitude and position, click it for the whole row, and open the rows in the table viewer.
  • Regions: box, circle, ellipse, annulus, line and point (and polygons from .reg files), with statistics and a centroid (and a magnitude where the file gives a flux scale); boxes and ellipses turn by a handle. Type exact coordinates in image or sky units, show statistics on the image, plot a region through a cube's planes or a file's frames, and save and load .reg files compatible with DS9. Large region files load as a fast overlay. The trash button at the top of the Regions panel deletes them all at once (one undo brings them back).
  • Contours: lines where the image crosses a set of levels, from the toolbar: by default rising from 3σ above the sky to the brightest structure, or spread over the stretch, or typed; smoothed first, in any width and color. They are traced next to the data at the view's resolution and included in exports.
  • Contours of another file: trace a second image's contours over the view, lined up through the sky (radio contours on an optical image), with levels from its own sky.
  • Star quick look: Shift+R over a star (or Examine star in the right-click menu) gives its FWHM, shape, peak, sky, flux and magnitude, with its radial profile and the fitted Gaussian.
  • Undo and redo: Ctrl+Z and Ctrl+Shift+Z (⌘Z and ⇧⌘Z) for regions, the stretch and colors, mosaic levels, the crop, the turn of the view and contours.
  • Profiles: plot the values along a line, widened into a band to collapse across it (for a slanted spectral trace), or along a box, each point a column or row of the box: mean, median or sum, with the sky beside it subtracted if you like, one curve per color channel of an RGB view or color HiPS and per filter of a color mosaic. Several lines or boxes share the plot to compare them (draw another with the profile open, or + add in its header; a circle's or ellipse's radial profiles the same, to compare stars), each in its own color. Hovering the plot marks the spot on the image; copy or save it as CSV. Zoom and pan the plot with the buttons in its corner, as in matplotlib's toolbar: Zoom to box (the magnifier), then drag a box over the part to look at; Pan (the arrows, the default), then drag to move along the plot; Home (the whole plot again) and Back; and Axis limits to type the range of x and y. The wheel zooms about the pointer (Shift: x only, Alt: y only; over an axis, that axis), Shift+drag does the other tool's drag, a right-drag always zooms to a box, right-click goes back a step and double-click shows everything. While y is automatic it fits what shows in x. Pin (the pushpin) keeps read-outs on the plot: with it on, click the plot and the read-out stays there, numbered on the plot and on the image, to compare two or three places (lines of a spectrum, say); click a pin again or its ✕ to take it off. With the other tools a click pins nothing.
  • Positions you can share: region cards and the Regions panel give RA and Dec (hh:mm:ss ±dd:mm:ss) or pixel coordinates (in a mosaic, the detector and its pixel); Label coordinates here writes them on the image, and lines show their length in pixels and arcseconds.
  • Magnitudes: circles and boxes on a flux-calibrated image show an AB magnitude, less the local sky, with its error from the file's error array.
  • Text and arrows on the image: write labels anywhere and draw arrows that point at objects; they keep their size as you zoom and are saved with the regions.
  • Inspection: pixel table, magnifier, navigator, a searchable header and metadata panel, an array picker and a cube slider with play.
  • Data quality masks: an image with a DQ array gets a panel listing the mask's bits and how many pixels have each, with flag names where the file's data model defines them. Tick bits to color them over the image; flags stay visible at any zoom.
  • Linked views: Link in the toolbar makes image tabs (or the desktop app's windows) follow each other's pan, zoom, turn, crosshair and plane, matched on the sky or by pixel, and the stretch too if you like.
  • Turn and crop: turn the view to any angle (the turn button, or , and . for quarter turns), north up and east left (n), or Square up, which turns the least that squares the data's outline with the screen and fits the view to the data. The crop tool (x) frames a picture for a poster, wallpaper or image of the day: a box that turns with the view, in any shape or a preset (16:9, 9:16, 4:5, 2:3, square…), and Fit to data cuts it to the largest such box with data everywhere, so the ragged edges of dithered or tiled data and the corners of a turned view are gone. Outside the crop the view is matted; export and shared pages keep to it.
  • Figures for papers and talks: the export button opens on Figure: the view (or the crop, a box, the whole image) as a publication figure, sized for a journal's column or page (PASP, SPIE Proceedings, JATIS) or a slide, previewed at true size on a mock page of that journal. Axes with ticks and labels outside the image, in right ascension and declination (shortened as 12ʰ30ᵐ00ˢ, 15ˢ, 30ˢ…), offsets from the center, pixel numbers, the file's linear coordinates, or a scale you give (λ/D, µm…) from a pixel you choose; a colorbar that is an axis of its own (evenly spaced decades for a log stretch, the unit typeset as MJy sr⁻¹, triangles where the data runs past the limits); a north–east compass and a scale bar. Text is STIX Two (or Arimo for sans), at sizes in points, with true minus signs and superscripts. Saved as vector PDF with the fonts embedded, or as a PNG of 300 or 600 dpi or more; the image is enlarged by whole pixels or averaged in whole blocks, never resampled. Copy caption gives a caption to start from.
  • Export: a full-resolution PNG of the crop, the whole image, the view or a box (a box region drawn with the box tool, b; or draw a box… in the dialog, which steps aside while you drag one out), turned as the view is, optionally block-averaged and with text, regions and a colorbar, rendered on the machine with the data. Save view as shown saves the screen (the crop, when there is one).
  • Color settings: Color settings… (the ⓘ beside the colorbar, right-click, or the export dialog) explains how the view colors its data: a one-paragraph description to copy into a caption or a methods section, then each channel's limits, stretch and curve, how the channels combine, and a mosaic's levels. Copy JSON and Save JSON… give the same settings as JSON, for scripts and other tools. Every exported PNG carries the same JSON in an iTXt chunk under the keyword pixel-clarity-color. For each channel (gray; red/green/blue; or in a color mosaic each filter, named by its hue with its hue in degrees) the file has its lo/hi, its stretch (name, parameters, and a numpy formula in x), contrast, bias and invert, its input files (in a mosaic, each with the gain and offset that match its levels), and a curve: the display value at 1024 evenly spaced points of x = (value − lo)/(hi − lo). A reader that interpolates the curve reproduces each channel exactly without implementing any stretch. Color channels have a mix, their share of red, green and blue: each output color is the sum over channels of mix times the channel's value. The pipeline field lists the steps in order. The file also records the colormap (256 colors) of a gray image, the saturation look with its formula, and the Auto enhance and mosaic settings.
  • Live reload: the view refreshes when the file is rewritten, keeping zoom, stretch and regions.

Sharing a view

Share in the toolbar (or Pixel Clarity: Share View as Web Page…) saves the view as one HTML file that opens in any browser, with no install: the same viewer, opening as you left it, with its stretch, colors, regions and text, under a title, caption and credit. Readers can pan, zoom, restretch, read values and coordinates, measure regions, take cuts and export images. Save in the page's bar writes a copy of the page that opens with the reader's view (and their own title, caption and credit), so a changed view can be passed on without VS Code; Ctrl+S (⌘S) opens it too. Pages and copies keep the side panels as they were left, and either can open with the tools hidden, the image alone. A copy of a page whose data sits beside it belongs in the same folder.

  • The page holds a preview of each image, so it opens at once anywhere.
  • By default full resolution comes with it as compact data: only the images the view shows, each value kept to within a quarter of its noise (as fpack does), which no stretch can show. Every tool keeps working, at a fraction of the files' size. It goes in the page, or in a folder beside it for a web server. Integer images are kept exactly; data-quality and error arrays stay behind.
  • Or full resolution is read from the files themselves, only for the part on screen, from wherever the reader can reach them:
    • In the page: the files themselves, for a page that works on its own.
    • A URL: by default the files' paths from where the page is saved, so a page uploaded with its data (to a web server or a storage bucket) finds it. You can give a base URL, or one URL per file; signed links to private storage work. The host must answer HTTP Range requests and, for a page served from elsewhere, allow it to read the files (CORS).
    • The reader's own copy: Data → Choose files… (or dropping the files on the page) reads them from the reader's disk. Nothing is uploaded.
  • A HiPS is never copied: the page reads its tiles from the HiPS folder itself, the default for a HiPS. Save the page beside the folder (or above it) and share the two together, as a zip or on a web server. From a web server the page finds the HiPS by itself; opened from disk, the reader chooses the folder once (Data → Choose folder…, or drops it on the page), since browsers don't let a page read the files beside it unasked.
  • The dialog asks two things, what gives full resolution (compact data, the files, or the preview only) and where it is stored (in the page or beside it), then says what you get: the page's size, anything that must sit beside it, and whether it opens from disk or needs a web server. The compact data's size is measured on a sample of the data, next to it.
  • Each file is checked by size and a fingerprint, so a page never shows another file of the same name.
  • Download saves the view as shown, a full-resolution image, or the data files.
  • With the sky services on, readers have What is this? and the Aladin Lite panel too, beside the image; Aladin Lite loads from CDS only when they open it.
  • h (or the toolbar's Hide tools) shows the image alone, here and in a shared page, for a clean look or a screenshot; h or Esc brings the tools back.
  • Without the data the page shows the preview, and values come from what is on screen.

Defaults

The Pixel Clarity icon in the activity bar opens a Defaults panel for how new viewers start: colormap, scale, limits, zoom, coordinate format, Auto enhance, panels, RGB and mosaic options, tables, remote transfer and sky services. Use current image's look saves the focused image's look as the defaults, and Apply to open images applies them. The panel edits the ordinary pixelClarity.* settings.

Mosaics

Select the detector files of an exposure and choose Open as Mosaic, or right-click their folder. The mosaic is an ordinary image tab: stretch, regions, overlays and exports work as for one image.

  • Layout: placed on a north-up plane by their sky coordinates, by the instrument's focal-plane layout when it is known, or side by side.
  • Detectors panel: show, hide and pick detectors; one that differs from the rest is flagged.
  • Matched levels: a calibration factor per detector, then sky offsets, so the edges don't show. Feather blends overlaps, Edges trims borders, and each detector can be trimmed by hand.
  • Color mosaics: tiles in two or more filters can be shown as one color image, as many filters as you have: each filter is drawn in its own hue, spread from red (the longest wavelength) to blue (the shortest), and the colors are added up, the way space telescope images of many filters are made. Each filter keeps its own limits and stretch (pick it in the toolbar or click one of its tiles), Auto enhance balances them on a neutral sky, and each filter's hue and amount can be changed, or the filter left out, in the Detectors panel; a negative amount takes the filter away from the colors of its hue. Select the tiles (or their folder), or one folder per filter, and choose Open as RGB.
  • Save mosaic writes a .pcmosaic file that brings the mosaic back.

HiPS

A HiPS is a sky image cut into a pyramid of tiles, the format Aladin and many survey archives use for images too large to handle whole. Right-click a HiPS folder and choose Open HiPS, or Open in Pixel Clarity on its properties file.

  • Any size at once: each zoom level is one of the HiPS's own orders, so only the tiles in view are read, and the first view needs only the coarsest tiles. Statistics and the histogram come from a sample of full-resolution tiles.
  • Values or color: FITS tiles are values: stretch, regions, statistics and full-resolution export work as for any image. PNG and JPEG tiles open in color.
  • As the sky looks: a HiPS up to about 20° across is shown on a tangent plane at its finest pixel size, each pixel the HEALPix pixel under its center, so values are the HiPS's own. It opens squared with the screen and filling the view, with sky coordinates under the cursor. A wider HiPS is shown on the HEALPix plane its tiles are cut from, which is equal-area but stretches shapes far from the equator.
  • Color from several: select one HiPS folder per filter and choose Open as RGB. Each filter gets its own hue, lined up by their sky coordinates.
  • Build one: Build HiPS… (right-click on an image with sky coordinates, or the command palette) writes the whole image, RGB set or mosaic as a HiPS beside the data: the values as FITS tiles (one HiPS per filter or channel) and/or the colors as shown (PNG or JPEG), at the HEALPix order nearest the data's pixels or one finer. It opens in Aladin and other HiPS viewers too.

Stacks of files

Frames written one per file can be viewed and plotted as one stack: select the files and choose Open as Stack, or right-click their folder. The slider and play step through the files, keeping the view, and regions plot through the stack as through a cube.

Frame subtraction

To see what changes from frame to frame, turn on Δ beside the frame slider (or press Shift+D): each frame of a cube, a stack of HDUs or a stack of files is shown less a reference, by default the first frame. Its menu picks another reference: the frame before each one, a frame you choose (or right-click a frame and choose Subtract this frame), the first read of each ramp of a cube with four or more axes, the mean of a range of frames, or another file, such as a bias or a dark (Subtract another file… in the right-click menu, also for a single image). It can divide instead, and keep the limits even about no change, which suits a diverging colormap.

The difference is made where the data is, so statistics, the histogram, readouts, region statistics, plots through the frames, profiles, contours and star measures are all of the difference, exactly, and only its tiles cross the network. The slider, the readout (which gives both frames' values too), the colorbar and the plots say what is subtracted, and holding \ shows the raw values. Exports and shared pages show it as the view does, and Save values as FITS… in the export dialog writes the difference with the frame's world coordinates.

Collapsing frames

The Σ button by the frame slider shows a cube's planes, a stack of HDUs or a stack of files as one image, each pixel a statistic of that pixel across the frames: mean, median, sum, standard deviation, minimum or maximum. The arrow beside it picks the statistic and which frames go in (all of them, or a range).

  • The collapsed image is an image like any other: its stretch, statistics, readouts, regions, profiles, contours and exports (PNG, and FITS with the WCS) are all of it. Hold \ to see a single frame's own values.
  • Blank values are left out pixel by pixel; a pixel blank in every frame stays blank. Integer frames stay exact under sum, minimum and maximum.
  • It is worked out next to the data, a band of rows at a time, so a cube far larger than memory collapses without being loaded, and only the result's tiles cross the link. Each frame is read once.
  • Along an axis: Moment 0 integrates each pixel along the axis (its values times the width of their frames), Moment 1 is where along the axis the pixel's signal is on average (a velocity field), and Slope is the slope of a line fitted through each pixel's values (a ramp's count rate). Along picks the axis: the cube's own (wavelength, frequency, velocity, a ramp's time), a header keyword that steps through a stack, or the frame number. The unit follows (Jy/beam km/s, DN/s).
  • From the plot: with a region or the cursor plotted through the frames, hold Shift and drag over a range of the plot to show those frames collapsed; the range is marked on the plot.
  • A sum, a standard deviation, a moment or a slope keeps a stretch of its own, as differences do. Frame subtraction and collapsing are one or the other for now, and a shared page can't hold a collapsed image yet.

Along the frame axis

  • The pixel under the cursor, through the frames. Right-click the image, Plot the pixel under the cursor: its spectrum, ramp or time series is drawn under the image and follows the cursor (or the crosshair, when pinned with c), beside the curves of any regions plotted.
  • Planes in physical units. Where a cube's header describes its third axis, the status bar shows the plane's wavelength, frequency, velocity or time beside its number, and plots can be drawn against it. A frequency axis with a rest frequency also gives radio velocity, a wavelength axis with a rest wavelength optical velocity, and wavelength and frequency are offered for each other. A cube of ramps with a group time gives the time of each read.

Live quick-look

For data still being taken:

  • Follow a growing sequence. Open a folder's numbered sequence as a stack (Open as Stack) and turn on Follow (the ▸| button by the frame slider): new frames of the sequence are taken in as they are written and the newest is shown, with the zoom, stretch and regions as they are. The folder is listed every couple of seconds only while Follow is on, and a file is taken once it has stopped growing.
  • Statistics as frames arrive. A region (or the pixel under the cursor) plotted through the frames gains a point for each new frame; only the new frames are read.
  • The newest frame less a reference. Frame subtraction applies to whichever frame is shown, so with Follow on the newest frame is shown less the first, the one before, a dark in another file, or the mean of a few.
  • Saturated pixels. Right-click, Mark saturated pixels: the pixels at or above the saturation value are colored, at any zoom (one saturated pixel still shows when zoomed out), and counted in the Data quality panel. The value starts from the header's SATURATE, else the most the file's integer type holds; a 12- or 14-bit camera needs its own typed in. It is of the image's own values, whatever is subtracted.
  • A running mean or median. Σ (collapse) over all frames follows the stack as it grows.

Blinking images

To compare images of one field, select them (or their folder) and choose Open to Blink. They are shown one at a time in one tab, lined up by their sky coordinates, so images of different sizes, pixel scales and orientations still match while you zoom and pan; images without sky coordinates line up pixel for pixel (choose Pixels in the Images panel to do that anyway). [ and ] step between them, space blinks them automatically at the rate picked beside the play button, and k turns blinking on or off in any mosaic. The readout, histogram and region statistics follow the image shown, and regions stay where they are on the sky.

Table viewer

Catalogs, photometry tables, instrument curves and time series open as a grid that scrolls smoothly through millions of rows.

  • Search and filters: filter with Python-like expressions, with autocomplete and inline errors, or from the data itself (a cell, a common value, a histogram range, a box on the plot).
  • Sort, arrange and compute: multi-column sort, reorder, resize, pin and hide columns, and add computed columns.
  • Inspect: a row panel for wide catalogs and a column panel with statistics, a histogram and common values.
  • Plot: scatter (density-binned for large tables), lines, histograms, time and log axes, color by a column.
  • Export: CSV, TSV, ECSV or a region file, or overlay the rows on an open image.

Built for remote work

When VS Code is attached over SSH or to a container, the data stays on the remote machine:

  • Decoding, statistics and table operations run next to the file.
  • The viewer renders locally on your GPU, so panning, zooming and re-stretching never touch the network.
  • Only the tiles on screen are sent, coarse first, then detail; full-resolution tiles are lossless.
  • Very large images are streamed from disk rather than loaded whole. The first open reads the file once; what it learns (the overview, statistics and zoomed-out tiles) is kept in a cache on that machine, so the next open is immediate. pixelClarity.cache.* sets its size and folder; Clear Pyramid Cache empties it.
  • Load all (right-click, Pixel Clarity: Load the Whole Image…, or the desktop app's View menu) brings a whole image into the view, down to full resolution if memory allows, so panning and zooming a huge image never wait: for showing one off on a big machine. It says first what each depth needs in memory, can keep full resolution as float16 for half that (readouts stay exact), and skips areas without data. It works in shared pages too. pixelClarity.viewerMemoryGB sets the memory a view may use; automatic, it offers up to half of the computer's memory where Pixel Clarity runs on it.
  • SIMBAD, VizieR and Aladin Lite are reached from your own computer and receive only sky positions; pixelClarity.online turns them off. While CDS doesn't answer, the same queries go to its official mirrors at CfA Harvard (simbad.cfa.harvard.edu, vizier.cfa.harvard.edu), Aladin Lite loads from jsDelivr (CDS's own npm build, checked by its hash), and the sky panel shows ESA's copies of the surveys (skies.esac.esa.int).
  • Send feedback opens a page on clarityorbital.com in your browser, with the version, what Pixel Clarity runs in and your operating system filled in. The app itself sends nothing.

Copy as Python

Right-click the image and choose Copy as Python… for a script that makes the view again with the pixel-clarity Python package, in a notebook or a script.

  • Your steps: what you did to the view, one call per step in the order you did it (the stretch, regions, contours, the grid, smoothing, the turn), then where the view is. It is read from the same history as undo, so nothing is recorded for it.
  • This view exactly: one call that opens the view from its saved state, for everything a step can't say yet (a channel's own stretch, a mosaic's levels, a crop).

Arrays in the debugger

While a Python program is paused in VS Code's debugger, right-click a variable in the Variables view and choose View in Pixel Clarity (or run Pixel Clarity: View in Pixel Clarity and type an expression, such as data - dark or tensor[0, 0]). The array opens beside your code at full precision: 16-bit, float and integer data as they are, with the readout, statistics, stretch and regions of any other image.

  • NumPy arrays, and anything NumPy can turn into one: lists, PIL images, pandas tables of numbers, astropy quantities, PyTorch tensors on any device. A cube opens with its planes to step through; an array whose last axis is 3 or 4 long opens in color.
  • As you step, the open view follows: at each stop the array is read again and the view updates, keeping its zoom, stretch and regions (arrays up to 256 MB; larger ones update when you view them again). An expression you typed is evaluated again at each stop, as a watch expression is.
  • The program writes the array itself to a temporary file beside VS Code's extensions, so nothing large passes through the debugger and it works the same over Remote-SSH. It needs NumPy in the program being debugged.

Remote control: agents, scripts and the command line

Off by default. With Remote control turned on (setting pixelClarity.remoteControl.enabled, or Pixel Clarity: Connect an AI Agent…, which offers to turn it on), programs running as you on the same machine can drive the views you have open: open files, mosaics and RGB sets, center and zoom (by pixel or sky position), change the colormap, scale, limits, Auto enhance, binning, contours and the grid, draw and measure regions (with AB magnitudes where the file gives a flux scale), find the brightest stars and fit them (position, flux, FWHM, ellipticity), read pixel values and profiles, export at full resolution, and take a picture of the view. Everything a command changes happens in your view, and Ctrl+Z undoes it.

  • AI agents (Claude Code, Claude Desktop, Codex, VS Code's chat, or anything that speaks MCP): Pixel Clarity: Connect an AI Agent… (in the desktop app, Help › Connect an AI Agent…) adds Pixel Clarity to Claude Code, or copies the settings for the others.
  • Command line: node ~/.pixel-clarity/mcp.mjs views, … get_view, … set_display '{"colormap":"inferno","limits":"99.5"}', … snapshot --out view.png. Answers are JSON, so a script in any language can call it.
  • Start with the guide: node ~/.pixel-clarity/mcp.mjs guide prints one page (under 4 KB) with every command, arguments that work as written, how positions and regions are given, and what keeps the answers short. It is written so that a small, cheap model can drive the viewer from it alone, and it is all a script's author needs; an agent that runs commands (rather than MCP tools) only needs to be told to run it first. … tools set_display prints one command's arguments in full.
  • Only your user account can connect (a socket and a token in ~/.pixel-clarity/control, readable by you alone), and nothing leaves the machine. A program that connects can open any file you can read in a view and save pictures where you can write. Over Remote-SSH it all runs on the remote machine, with the data.
  • While it is off, nothing listens and nothing is written, and a view loads none of the code for it. It is a setting of yours on a machine: a folder's own settings can't turn it on. A VS Code window starts listening once Pixel Clarity has been used in it (an image opened, or one of its commands run).

Add-ons

The desktop app takes add-ons (Help → Add-ons…), which add features to it. Pixel Clarity itself is complete and free without them. Pixel Clarity Multi-monitor, which shows one image across a wall of screens (each screen its part of one view, bezels allowed for), is a licensed add-on available from Clarity Orbital Inc.: contact us at clarityorbital.com.

Keys

f fit · 1/2/4 zoom · z zscale · m min/max · s cycle scale · i invert · r reset contrast · Shift+A auto enhance · Shift+R star quick look · Ctrl+Z/Ctrl+Shift+Z undo/redo · c crosshair · [ ] slices · space play · b/o/l/p region tools · t text · e region coordinates · g plot region vs plane · a statistics on the image · F2 label · Esc pan tool · ? help

Acknowledgements

Thanks to Maxime Rizzo and David Morgan, who tried Pixel Clarity early and whose feedback and feature requests helped shape it.

What is this? uses the SIMBAD database, operated at CDS, Strasbourg, France (Wenger et al. 2000, A&AS 143, 9). The sky panel is Aladin Lite (Boch & Fernique 2014, ASP Conf. Ser. 485, 277), also from CDS, loaded from aladin.cds.unistra.fr when the panel opens; it is not bundled with the extension. The catalog overlays query VizieR (Ochsenbein, Bauer & Marcout 2000, A&AS 143, 23) and SIMBAD at CDS; cite the catalogs you use as their VizieR pages ask. If SIMBAD, VizieR or Aladin Lite helps your research, please acknowledge them as CDS asks.

The zscale algorithm is ported from astropy, which derives it from STScI's numdisplay. The colormap tables come from matplotlib. Licenses for these and for the bundled npm packages are in THIRD_PARTY_NOTICES.md, which ships with the extension.

License

MIT © 2026 Clarity Orbital Inc. See LICENSE.

Development

npm install
npm test                 # decoder + statistics tests against astropy/numpy/h5py fixtures
npm run dev              # build + browser harness at http://localhost:5178 (add &rtt=150&mbps=10 to throttle)
npm run package          # → pixel-clarity-<version>.vsix

To regenerate the test fixtures (nothing is installed into conda base):

uv run --no-project --with numpy --with astropy --with h5py --with tifffile --with pillow --with asdf --with asdf-astropy --with lz4 --with pyarrow --with pandas --with gwcs --with astropy-healpix --with reproject --with netCDF4 --with scipy --with mat73 python scripts/make_fixtures.py

Desktop app

desktop/ is Pixel Clarity as a desktop app (Electron) for macOS, Windows and Linux. It runs the same viewer bundles as the extension, served by the same host code (src/host/), so it needs no changes of its own when the viewer gains features. Build the extension first (it uses dist/), then:

cd desktop
npm install
npm start                # build and run (files to open may follow: npm start -- image.fits)
npm run typecheck
npm run e2e              # end-to-end check (on Linux without a display: xvfb-run -a npm run e2e)
npm run dist             # installers for this platform → desktop/release/ (add -- --dir for a folder only)

Add-ons are folders in the profile's addons/ folder, each with an addon.json (desktop/src/addonManifest.ts), a main-process module given DesktopAddonApi (desktop/src/addons.ts) and a viewer script given ViewerAddonApi (src/webview/addons.ts). The hook is part of the app and MIT like the rest; without add-ons it does nothing.

Releasing

  1. Add notes under ## Unreleased in CHANGELOG.md as you go.
  2. npm run release -- patch (or minor, major, 1.2.3). This bumps the version, moves the notes under it, commits Release vX.Y.Z and tags vX.Y.Z.
  3. git push origin main --follow-tags. The Release workflow tests the tag, builds the extension and attaches it as pixel-clarity.vsix to a GitHub release named after the tag, with the same notes. It then builds the desktop installers on macOS, Windows and Linux (.github/workflows/desktop.yml), checks each packaged app end to end, and attaches them too: Pixel-Clarity-mac.dmg (universal: Apple silicon and Intel), Pixel-Clarity-win-x64.exe, Pixel-Clarity-linux-x64.AppImage and Pixel-Clarity-linux-x64.deb. They are unsigned until the signing secrets listed in that workflow are set.
  4. Download the .vsix from that release and upload it to the Marketplace (publisher clarity-orbital → Pixel Clarity → Update).
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft