<<

What to do about huge LIGO/ Virgo sky maps Leo Singer, NASA/GSFC

LIGO-G1800186-v3

!1 The problem We’re getting better at pinpointing gravitational-wave sources as more detectors come online and existing detectors become more sensitive.

Unfortunately, as position accuracy improves, the size of the sky maps that we send to observing partners is going to blow up.

This started being a minor inconvenience in O2 with GW170817. It will get slowly worse as we approach design sensitivity. It’s already a major pain if you are studying future detector networks with simulations.

!2 HEALPix primer Górski+ 2005 HEALPix 763 radians measured eastward. Pixel centers on the northern hemi- are given by the following equations: polar cap.—Forph ( p 1)=2, the ring index 1 ¼ þ  Hierarchical Equal Area isoLatitude Pixelization: data i < Nside, and the pixel-in-ring index 1 j 4i,where   structure for storing data that lives on the unit sphere i I ph Iph 1; 2 ¼ À ðÞþ ð Þ qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi j p 1 p2ffiffiffiffiffiffiffiffiffiffiffii(i 1); 3 ¼ þ À À ð Þ • Hierarchical: each tile contains four higher-resolution i2 z 1 2 ; 4 ¼ À 3Nside ð Þ daughter tiles, forming a tree structure  s  j ; and s 1: 5 ¼ 2i À 2 ¼ ð Þ  North equatorial belt.— For p0 p 2Nside(Nside 1), Nside ¼ À À  • Equal Area: all tiles of a given resolution have the i 2Nside,and1 j 4Nside,where    same area and approximately the same shape i Ip0=4 Nside Nside; 6 ¼ ðÞþ ð Þ j p0 mod4 Nside 1; 7 ¼ ðÞþ ð Þ 4 2i • isoLatitude: tiles are arranged on rings of constant z ; 8 ¼ 3 À 3Nside ð Þ

No.Fig. 2, 20053.—Orthographic view of theHEALPix HEALPix partition of the sphere. The761  s to permit fast convolution using spherical overplot of and meridians illustrates the octahedral symmetry of  j ; and s (i Nside 1) mod 2; 9 ¼ 2 Nside À 2 ¼ À þ ð Þ HEALPix. Light gray shading shows one of the 8 (4 north and 4 ) identical  harmonics polar base-resolution pixels. Dark gray shading shows one of the 4 identical equatorial base-resolution pixels. Moving clockwise from the top left panel, the where the auxiliary index s describes the phase shifts along the grid is hierarchically subdivided with the grid resolution parameter equal to rings and I(x)isthelargestintegernumbersmallerthanx. Nside 1, 2, 4, 8, and the corresponding total number of pixels equal to Pixel center positions in the are obtained by ¼ 2 Npix 12 ; N 12, 48, 192, 768. All pixel centers are located on Nring ¼ side ¼ ¼ the mirror symmetry of the grid with respect to the equator (z 0). • Pixelization: good at storing images 4Nside 1 rings of constant latitude. Within each panel the areas of all pixels are ¼ identical.À One can check that the discretized area element ÁzÁ pix is a constant by defining Áz and Á as the variationjj of z and¼ when i and j,respectively,areincreasedbyunity. Fig. 1.—Quadrilateral tree pixel numbering scheme. The coarsely pixelized coordinate patch on the left consists of 4 pixels. Two bits suffice to label the pixels. !3 To increase the resolution, every pixel splits into 4 daughter pixels, shown on the right. These daughters inherit the pixel index of their parent (boxed) and acquire shouldtwo new bits to form be the new retained pixel index. Several suchfor curvilinearly reasons mapped coordinate related patches (12 in to the case the of HEALPix, fast and 6 inharmonic the case of the COBE QuadCube) are joined at the boundaries to cover the sphere. All pixel indices carry a prefix (here omitted for clarity) that identifies which base-resolution pixel they transform.belong to. 4.2. Pixel Indexing This preferred implementation, which is referred to as satisfies desiderata 1 and 3 but by construction fails with desid- rilateral tree, which admits an elegant binary indexation (il- Specific geometrical properties allow HEALPix to support HEALPix,eratum 2. This is a nuisance is afrom geometrically the point of view of application constructed,lustrated in Fig. 1) self-similar, previously employed in the refinable construction of to full-sky survey data as a result of wasteful oversampling near the QuadCube spherical pixelization. two different numbering schemes for the pixels, as illustrated in quadrilateralthe poles of the map. While mesh the angular on resolution the of sphere the mea- asNext, shown let us consider in the Figure base-level spherical 3. The tessellation. base An surements is fixed by the instrument and does not vary over the entire class of such tessellations can be constructed as illus- Figure 4. resolutionsky, the map resolution, comprises or pixel size, depends 12 on the pixels distance intrated three in Figure rings 2. These constructions around are characterized the poles by two from the poles. This must also be accounted for in work related to parameters: N—the number of base-resolution pixel layers First, in the ring scheme, one can simply count the pixels mov- the integration of data or discretized functions over the sphere. between the north and south poles and N—the multiplicity of and(c) Hexagonal equator. sampling Thegrids with resolution icosahedral symmetry per- of thethe meridional grid is cuts, expressed or the number of equatorial by or the circumpolar pa- form superbly in those applications where near uniformity of base-resolution pixels. Obviously, the total number of base- ing down from the north to the along each isolatitude rametersampling on the sphereNside is essential,whichdefinesthenumberofdivisionsalongthe (Saff & Kuijlaars 1997), and resolution pixels is equal to Nbase pix NN, and the area of À ¼ they can be devised to meet desideratum 2 (Tegmark 1996). each one of them is equal to base pix 4=(NN). One should ring. It is in this scheme that Fourier transforms with spherical sideHowever, of by construction a base-resolution they fail both desiderata 1 and pixel 3. thatalso isnotice needed that each tessellation to reachÀ includes¼ two a single desired layers of (d) Igloo-type constructions are devised to satisfy11 desidera- polar cap pixels (with or without an azimuthal twist in their harmonics are easy to implement. Second, one can replicate the high-resolutiontum 3 (E. L. Wright 1997, private partition. communication; CrittendenAll pixelrespective centers positions on the are sphere placed for odd or even on values rings of N, & Turok 1998). Desideratum 2 can be satisfied to reasonable ac- respectively) and (N 2) layers of equatorial zone pixels, tree structure of pixel numbering used, e.g., with the QuadCube. ofcuracy constant if quite a large number latitude, of base-resolution and pixels are is used equidistantwhich form a regular in rhomboidalÀ grid in the (on cylindrical each pro- (which, however, precludes the efficient construction of simple jection of the sphere. Since the cylindrical projection is an area- This can easily be implemented since, because of the simple ring).wavelet transforms). All isolatitude Conversely, a tree structure rings seeded located with a preserving between mapping, the this property upper immediately and illustrates lower that small number of base-resolution pixels forces significant var- the areas of equatorial zone pixels are all equal, and to meet description of pixel boundaries, the analytical mapping of the iations in both the area and shape of the pixels. our requirement of a fully equal area partition of the sphere,2 we corners of the equatorial base-resolution pixels (i.e., 3 < (e) The GLESP2 construction (Doroshkevich et al. 2005) ex- need to demonstrate that our constructions render identical HEALPix base-resolution elements (curvilinear quadrilaterals) cosplicitly implements< ), the or Gauss-Legendre in the quadrature equatorial scheme to zone,areas for are the polar divided pixels as well. into Indeed, thisthe allowsÀ same one to render high accuracy3 in numerical integrations with respect to formulate a constraint on the colatitude * at which the lateral latitude but allows irregular variations in the pixel area and is vertices of both polar and equatorial pixels meet: into a 0; 1 ; 0; 1 square exists. This tree structure, aka nested numbernot hierarchical—in of fact, pixels: it offers noN relationeq between4N theside tes- . The remaining rings are located ½ Š ½ Š sellations derived at different resolutions. ¼ 2 N base pix N 1 scheme, allows one to implement efficiently all applications in- within the polar cap regions ( cos 2 1>cos)andcontainavarying À ;hencecos À : ðÞ¼À 3 à 2 à ¼ N 4. MEETING THE REQUIREMENTS: jj volving nearest-neighbor searches (Wandelt et al. 1998), and number of pixels, increasing from ring to ring, with increasing1 THE HEALPix SOLUTION ð Þ also allows for an immediate construction of the fast Haar wave- All the requirements introduced in 3 are satisfied by the class The curvilinear quadrilateral pixels of this tessellation class distance from thex poles, by one pixel within each quadrant. A of spherical tessellations structured as follows (Go´rski et al. 1999). 2 retain equal areas but vary in shape, depending on their posi- let transform on HEALPix. HEALPixFirst, let us assume map that the has sphereN is partitioned12 intoN a tionspixels on the sphere. of the We have same chosen the areaN 3, N 4grid number of curvilinear quadrilaterals, whichpix constitute the base- side(Fig.2,middle row, right column) as the definition¼ ofpix our¼ digital level tessellation.2 If there exists a mapping of each¼ element of full-sky map data standard. This choice was based on three driv-¼ The base-resolution pixel index number f runs in 0; N N partition=(3N ontoside a square). 0; 1 ; 0; 1 ,thenanestedn; n sub- ing requirements: that there should be no more than 4 pixels at À division of the square into½ everŠ diminishing½ Š subelements is ob- the poles to avoid acute , that the elongation of equa- 1 0; 11 .Introducingtherowindex tained trivially, and a hierarchical tree structure for the resulting torial pixels should be simultaneously minimized, and that g ¼ f g È database follows. For example, a 2 ; 2 partition4.1. rendersPixel a quad- Positionsthe 2n multiplicity of pixels on rings in the equatorial zone frow If=N ; 10 For a resolution parameter Nside,thepixelsarelaidouton ¼ ð Þ 4Nside 1isolatituderings. ÀÁ TheÀ of pixel centers on the sphere are defined by we define two functions that index the of the south- (z cos ; ), where  0;  is the colatitude in radians mea- ernmost corner (or vertex) of each base-resolution pixel on the sured from the north pole2½ andŠ  0; 2 is the in sphere in latitude and longitude, respectively: 2½ Š

F1( f ) frow 2; 11 11 It should be noted that the WMAP team uses an alternative notation for ¼ þ ð Þ defining various levels of resolution. Specifically, they refer to a ‘‘resolution k F2( f ) 2 f mod N frow mod 2 1: 12 level’’ defined by Nside 2 ,wherek can adopt the integer values 0, 1, 2, ....  ¼ ¼ À ðÞþð Þ ÀÁ HEALPix pixel indexing

The index or address of a HEALPix tile consists of three pieces of information:

• Resolution (nside): lateral number of subdivisions along the twelve base-level tiles. At any resolution, there are a total of npix = (12 nside 2) pixels.

• Pixel index (ipix): pixel number from 0 to (npix - 1).

• Ordering scheme (order): RING or NESTED. In the RING scheme, pixel numbers advance in and then . In the NESTED scheme, pixel indices follow the hierarchical structure described on the previous slide.

Fig. 4.—Layout of the HEALPix pixels on the sphere in a cylindrical projection and a demonstration of two possible pixel indexations—one running on !4 isolatitude rings, the other arranged hierarchically or in a nested treeGórski+ fashion. The top two panels2005 correspond to Nside 2 in first ring then nested schemes; the bottom ¼ two panels are for Nside 4.  refers to the colatitude and  to the longitude. ¼ Why do we use HEALPix for LIGO/Virgo probability maps?

• LIGO/Virgo localizations can • subtend large angles • wrap around the whole sky • have multiple widely separated modes • have irregular shapes, fringes

• Difficult to pick a good partial-sky projection (e.g. gnomonic, orthographic) in the general case

• Traditional all-sky projections have wild variations in pixel size (e.g. plate carée) or shape (e.g. Mollweide, Aitoff) and as well as seams

• HEALPix was already well-established for specialized uses in astronomy (CMB, full-sky mosaics)

• Good support in software (e.g. DS9, Aladin) and libraries (C, C++, Python, Java, MATLAB, IDL, etc.) !5 Adaptive subdivision

• Most LIGO/Virgo sky maps (BAYESTAR, LALInference, LIB) are generated using 1. Evaluate localization on this adaptive subdivision sampling base tesselation of N pixels 2. Sort by probability and select top N/4 pixels scheme. 3. Subdivide & replace with • First, the probability is calculated at all N new daughter pixels sky positions at a resolution of nside=32 4. Sort by probability and select top N/4 pixels (≈13 deg2 / tile, total of 3072 tiles). 5. Subdivide & replace with N new daughter pixels • Then, we take the 768 highest 6. Sort by probability and probability tiles, and subdivide them select top N/4 pixels into 3072 new tiles. Repeat • The last step is repeated 7 times. Singer + Price 2016

• This is a simple feedback control The resulting HEALPix tree contains exactly 19200 tiles. system that drives the pixels to have This gets flattened out to a HEALPix image with the resolution of the smallest tile. comparable probability: e.g. smaller The lowest possible resolution is nside=128, ≈0.2 deg2 / pixel, ≈200k pixels. pixels in regions of higher probability The highest possible resolution is nside=2048, ≈3 arcmin2 / pixel, ≈50M pixels. density.

!6 Adaptive subdivision: benefits

• Expensive per-pixel calculations are quickly focused toward regions where extra detail is needed

• Work can be done in large parallel batches (of 3072 pixels)

• Resulting sky maps are detailed but can be gzip- compressed with high compression ratios because of the long runs of identical pixel values

• Codes that are aware of the adaptive subdivision scheme can accelerate other expensive calculations massively (galaxy completeness integrals, volume rendering)

Singer + Price 2016

!7 Issues for well-localized events

• For well-localized events like GW170817, the adaptive subdivision can proceed to the highest possible resolution, nside=2048.

• The gzip-compressed FITS files are still very small on disk (~1 MB) because the HEALPix trees still have only ~20k tiles.

• However, the uncompressed FITS files can get very large in memory, ~1.5 GB, because they are stored at high resolution.

• Just decompressing the sky maps to read them in can take a few seconds, and they can be cumbersome to deal with in memory.

!8 Proposal 1: reduce maximum resolution

• Proposal: reduce maximum resolution by decreasing the maximum number of subdivisions by 2 steps.

• Reduces the maximum resolution to nside=512, 0.01 deg2 / pixel.

• Reduces the maximum in-memory size of sky maps to ~100 MB.

• Impact on area and volume shown on next slide.

!9 first2years / 2015

area P—P plot volume P—P plot • Based on “First Two Years” mock data challenge sample (Singer+ 2014, Berry+ 2015, Farr+ 2016, Singer+ 2016)

• Downsampled events and to a maximum resolution of nside=1 to 1024 (maximum original resolution is 2048)

• Downsampling approximates the effect area histogram volume histogram that reducing the number of adaptive subdivision steps would have

• Looks like reducing the number of adaptive subdivision steps by 1 or 2 would be safe

!10 first2years / 2016

area P—P plot volume P—P plot • Based on “First Two Years” mock data challenge sample (Singer+ 2014, Berry+ 2015, Farr+ 2016, Singer+ 2016)

• Downsampled events and to a maximum resolution of nside=1 to 1024 (maximum original resolution is 2048)

• Downsampling approximates the effect area histogram volume histogram that reducing the number of adaptive subdivision steps would have

• Looks like reducing the number of adaptive subdivision steps by 1 or 2 would be safe

!11 Proposal 2: publish multi-resolution HEALPix trees

• Make experimental multi-resolution HEALPix files available along side the traditional FITS files.

• No standard data format exists. However, there is related prior art in the Virtual Observatory:

• Multi-Order Coverage (MOC) maps — Boch+ 2014

• HEALPix multi-resolution data structures — Reinecke + Hivon 2015

• Hierarchical Progressive Surveys (HiPS) — Fernique+ 2017

• UNIQ indexing scheme — Górski+ 2017, section 3.2

!12 UNIQ indexing scheme

• Recall from before that three pieces of information are required to specify a HEALPix tile: nside, ipix, and order.

• There is a third HEALPix indexing scheme called UNIQ. The UNIQ ordering assigns a single unique integer to every HEALPix tile at every resolution. If ipix is the pixel index in the NESTED ordering, then the unique pixel index uniq is

uniq = ipix + 4 nside 2.

The inverse is

nside = 2 floor(log₂(uniq/4)/2) ipix = uniq - 4 nside 2.

!13 A&A 578, A114 (2015) Multi-Order Coverage (MOC) maps

• Used by Virtual Observatory (e.g. Aladin and related tools) to store survey footprint shapes

• Stored as a list of UNIQ HEALPix indices in a FITS binary table

Fig. 3.Boch+Multi-order 2014 coverage, Fernique+ (MOC) map of the 2015 SCUBA 850 µmdata.Thelower left panel shows an approximately 5◦ 2◦.5regionofthe HiPS image of the SCUBA 850 um map. The MOC map of this region is shown in red, where we display the individual× HEALPix pixels of different orders that define the MOC. The lowest order (largest HEALPix pixel) in this MOC is k = 6(correspondingtoθ = 55.′0), and the range of orders extends up to!14k = 15 as shown in the magnified section of the figure where the smallest (θ = 6′′. 44) pixels define the resolution of the MOC.

< HEALPix pixels over all orders k = 15. The resulting MOC dis- so far been successfully generated for astronomical source cat- played in Fig. 3 shows how the HEALPix pixels of different or- alogues and multi-dimensional cube data, and the tile container ders fill out this complex and non-contiguous pattern of coverage has also been found to be very useful for storing links to the on the sky. Compacting the pixels allows the larger contiguous detailed metadata about the original progenitor data associated areas to be efficiently filled with lower order pixels, while the with the tiles. finer details of the shape are represented by the smaller pixels at Here we describe the considerations to be taken into account the chosen resolution. when generating HiPS for different types of data; images, cata- logues, and three-dimensional data cubes.

4. HiPS for images, source catalogues, 4.1. Images and three-dimensional data cubes As described in Sect. 2,theHiPSrepresentationofanimage The development of the HiPS scheme has been driven by the survey is generally constructed by resampling the images onto a need for scientifically robust hierarchical access to image survey HEALPix grid at the maximum desired order kmax,andthengen- data. The most direct use of HiPS is thus the mapping of astro- erating the tile images for each of the tile orders. The process for nomical images onto HiPS tiles. The HiPS scheme is however resampling the pixel values from the original images depends not limited to images, rather it can be used for many kinds of on the intended purpose, and involves all of the same issues as data. The concept that promotes the use of HiPS beyond its ap- generally encountered when mosaicking images. In general it is plication to images is that the HiPS tiles may be used as general necessary to consider the desired angular resolution and resam- containers for any sort of information that is related to the sky pling of the images, and also the choice of the methods to be coverage of the tiles. The content of the tile container can then used for combining data in regions where images overlap, and vary according to different objectives. HiPS data structures have how to deal with variations in the background level.

A114, page 6 of 19 The figure above illustrates HiPS in the context of the overall IVOA Architecture.

Hierarchical Progressive Surveys (HiPS)

• Used by VO tools (e.g. Aladin) for storing all-sky imaging data; Fernique+ supporting deep zooming 2015, 2017

• Consists of a multi-order A&A 578, A114 (2015) defined range of orders. The main considerations when con- coverage map (MOC) and a structing the catalogue tiles are to decide on the approximate number of sources per tile, and the definition of the sorting directory tree of data files key. The sorting key determines the distribution of the cata- 2 Usage examples logue sources over the HiPS tiles as a function of the HiPS or- containing HEALPix files or der, and the sorting key can be defined by any quantitative The most common usage of HiPSproperty. is the visualisation of data from large astronomical surveys. HiPS allows oneGiven to thebrowse sorting key,“big catalogue data“ tiles: pan can beand constructed zoom by HEALPix file fragments successively filling the tiles with sorted order sources up to an into each section of the survey dataapproximate using HiPS limit forclients each tile, that and thenaccess recursively the moving data to over the internet. Only the portion of thethe next data order needed to fill the fourfor sub-tiles. the current Practical user tests show view that is streamed from the server to the client.catalogue This source remote densities ofvisualisation up to 500 sources technique per tile allow Already well-supported by for manageable zooming, but the tile∼ source limit need not be � enables the exploration of large dataconstant, sets from and in somea wide cases field it has of been view found where to be useful an to

entire survey is projected on the wholeallow sky, logarithmic to a ordetailed other non-linear zoomed increases view in the at number the of Aladin 3 - HiPSsources architecture per tile as a functionbased ofon the directories order. We note and that files HEALPix Fig. 5. HiPS cataloguefinest tilesspatial – content resolution and visualisation. of Thethe content images of aliasing used patterns for the can survey. occur when the original catalogue has het- aHiPScataloguetiledependsonho wthesourcecatalogue points are erogeneous distribution, and that this can be minimised by mod- chosen to be distributed over the differentThe HiPS number orders. The upper of HiPS panel ifying orders the number depends of sources on in the the tiles original based on the data catalogue parameters: the Complicated directory structure shows three HiPS tiles of successive orders, with the lowest order tile source density on wider scales. � on the left and sibling tiles to the right.angular The filled resolution circles in the tiles for a pixelFilling thesurvey, tiles in thisthe manner number means of that sources each catalogue for a catalogue, represent catalogue sources that are“stored”ineachtile,andtheupperetc. It also depends onsource the is only size included of the once HiPS in the HiPS tile catalogue.(see next Visualising section). A HiPS makes it hard to use for data set of tiles represents a sequential view of these orders. Lower panel: aHiPScataloguebyscanningthroughtheordersprovidesapro- the same three tiles but in this case wemay represent use a cumulative a partial view of tree (where not all sphere HEALPix cells are described), the HiPS catalogue, where zooming into higher order tiles shows the gressive view of the catalogue, and this can be controlled in a analysis sources in the tile plus the cumulativenotably set of sources for a over survey all of the thatnumber does of ways. not Forcover example, the a whole sequential sky, view ofand the tilesit may of be possibly lower orders. different orders would show only the sources in each order. More This visualisationnot uniform technique (different is not limitedcommonly, depth to a for cumulative pixel different surveys view shows branches) butall of the may sources like also in thefor be area catalogue with used for otherdifferent data types: densities source on catalogues, theof the sphere. tile up to pixela given order.cubes, This etc. is illustrated For example, symbolically in catalogues. HiPSthe!15 providesHiPS ascheme means to organise can abe catalogue used based to describeFig. 5 where a themultiresolution top panel represents view a sequential of a view source of three on the spatial distribution of the source catalogue points on the successive orders of a HiPS catalogue, showing the catalogue sky. A HiPScatalogue catalogue made where up4.2 of multiple theHiPS tiles selection overtile a rangeformats of cataloguesources that are points stored in each is order.a representation The lower panel shows of a of tile ordersdifferent (ktile)canprovidedi parametersfferent views like of the brightness. catalogue cumulative This view allows of the same a di HiPSfferent catalogue, view where of zooming the that change as a function of theTh angulare content resolution. of The the free- HiPSinto successive tiles depends higher orders on shows the all of the sources of in the the area original survey: dom to choosecatalogue which subset at of di thepixelff catalogueerent arrays zoom to include for level.an at any image Forof the examplesurvey, tile up to catalogue the we current could order. sourcedisplay Note that list fa constructioninter for a and catalogue of a survey, given orderfainter means that, sources in addition as to the one spatial zooms organisation, into highercumulative orders view requires of the combining map. all As of the such, sources HiPS from the the catalogue may also be organisedcube over arrays the diff erentfor ordersa cubecurrent survey, tile and vector all of its parentarrays tiles. for polarization data, properties according to a hierarchy that canfor be basedlocalized on any quantitative meta-data (progenitors),The 2MASS all-sky catalogue etc. This of point document sources (Cutri describes et al. only the property of the catalogue, such asformat the source of brightness, the tiles or field dedicated2003a)contains to images,470 million catalogues sources with and measurements cubes incorresponding density, source redshift, or distance. The association of subsets the J, H,andKsbands.AHiPSrepresentationofthiscatalogue∼ of catalogue sources with HiPS tilesrespectively over a range of to orders image en- HiPShas4 been , catalogue generated by mapping HiPS the, and positions cube of the HiPS sources. onto ables a progressive view of the catalogue so that the selection of HiPS tiles up to a maximum order of ktile = 11, which corre- sources that are displayed can change as a function of the zoom sponds to a tile size of 1.′72. The sorting key for this HiPS cat- level. For example, a HiPS catalogueA HiPS organised tile by sourcemust bright- containalogue the is based data on the(pixels, infrared brightnesscatalogue of the sources...) sources where located in its ness can be presented so that the widestassociated full sky view HEALPix shows only cellwe have on combined the sky. the fluxesThis in implies the J, H,and thatKsbands. the data must have a the brightest sources, with fainter sources progressively appear- The largest HiPS catalogue that has so far been constructed ing in the display as one zooms intofootprint smaller and on smaller celestial regions is sphere that of the (describedGaia model by snapshot a WCS (Robin solution et al. 2012a ). for images or (Fig. 5). cubes, and described byThis spherical is based on GUMS-10 coordinates simulation for of catalogue the expected content sources). The tile In practice a HiPS catalogue is organised in the same way as of the catalogue that will be generated from the ESA Gaia astro- aHiPSimagesurvey,makinguseoftheHiPStilestoorganiseformat depends on themetric survey mission data (Perryman type: et al.FITS, 2001). GaiaJPEG,is expected PNG to createfor image or cube the spatial sky coverage of the cataloguesurveys; so that TSV the astronomical for catalogues.acatalogueof These109 basic with astrometric tile formats accuracies have of 5–15 µ beenas especially source positions in the cataloguechosen are associated in with order the corre- to facilitate(for G band checking magnitudes∼ < of12) the and 5–600 tile contentµas for the full with cata- basic file tools sponding HiPS tiles. Whereas each tile of a HiPS image survey logue. The 2 109 simulated Galactic objects in GUMS-10 contains a 512 512 image, eachand tile of editors. a HiPS catalogue con- catalogue of∼ “milky× way stars” are based on the Besançon model × tains a list of catalogue sources (with at least the RA and decli- (Robin et al. 2003), which provides the distribution of the stars, nation coordinates of the sources) in the form of catalogue rows their intrinsic parameters, and their motions. The HiPS of this that have been extracted from the full original catalogue. In the catalogue uses the simulated sky coordinates and the sources are present implementation of HiPS catalogues the tiles are stored as distributed over HiPS orders up to ktile = 11. The sorting key ASCII tab separated value (TSV) files, and these tiles are organ- is chosen to be the simulated barycentric distance (in parsecs) ised into the file system directory structure of HiPS tile orders. that is provided in the catalogue,aquantitythatthemissionis The metadata about the columns of the catalogue are stored in a expected to derive from accurate parallax measurements. VOTable (Ochsenbein et al. 2011)documentalongsidethelow- Another example is9 the HiPS catalogue that has been est order tile files. constructed from the CDS SIMBAD18 astronomical database The construction of the catalogue tiles involves extracting rows from the original catalogue into the HiPS tiles over a 18 http://simbad.unistra.fr

A114, page 10 of 19 Proposal: multi-resolution HEALPix image format

• A superset of the MOC format: a table of UNIQ pixel indices, but with extra floating point columns for image data.

• In our case, the columns are:

• UNIQ pixel index

• PROBDENSITY probability density per steradian

• DISTMU distance location parameter

• DISTSIGMA distance parameter

• DISTNORM distance normalization parameter

!16 FITS header — HEALPix image

This is a minimal FITS header for a LIGO/Virgo sky map in the conventional fixed-resolution image format.

TFIELDS = 2 / number of table fields TTYPE1 = 'PROB ' TFORM1 = 'D ' TUNIT1 = 'pix-1 ' PIXTYPE = 'HEALPIX ' / HEALPix magic code ORDERING= 'NESTED ' / NESTED coding method COORDSYS= 'C ' / ICRS reference frame NSIDE = 2048 / Resolution parameter of HEALPIX INDXSCHM= 'IMPLICIT' / Indexing: IMPLICIT or EXPLICIT

!17 FITS header — HEALPix image

This is a minimal FITS header for a multi-order coverage map according to the IVOA document.

TFIELDS = 1 / number of table fields TFORM1 = 'K ' TTYPE1 = 'UNIQ ' PIXTYPE = 'HEALPIX ' / HEALPix magic code ORDERING= 'NUNIQ ' / NUNIQ coding method COORDSYS= 'C ' / ICRS reference frame MOCORDER= 11 / MOC resolution (best order)

!18 FITS header — multires image

This is a minimal FITS header for a LIGO/Virgo sky map in the proposed multi-resolution image format.

TFIELDS = 2 / number of table fields TTYPE1 = 'UNIQ ' TFORM1 = 'K ' TTYPE2 = 'PROBDENSITY' TFORM2 = 'D ' TUNIT2 = 'sr-1 ' PIXTYPE = 'HEALPIX ' / HEALPix magic code ORDERING= 'NUNIQ ' / NUNIQ coding method COORDSYS= 'C ' / ICRS reference frame INDXSCHM= 'EXPLICIT' / Indexing: IMPLICIT or EXPLICIT

!19 Software support

• This format has been used internally in BAYESTAR, LALInference, and LIB sky map generation for all of O3 because the UNIQ ordering is convenient for the implementation of the adaptive subdivision algorithm.

• The sky maps are converted from this format to NESTED ordering before writing them to disk.

• Transparent support for reading and writing in the lalinference.io.fits Python module: whatever ordering is used on disk, files can be loaded into RING, NESTED, or UNIQ data structures. Likewise, whatever representation is used in memory, HEALPix array can be written in any requested ordering.

• UNIQ indexing functions in Python in lalinference.bayestar.moc Python module.

• My own sky map postprocessing codes (credible areas and 3D volumes, P—P plots) already exploit the UNIQ data structure for speed.

!20 Discuss!

!21