STILTS-TSKYMAP(1)
π¦ STILTS-TSKYMAP π¦
okay bestie, hi π welcome to stilts-tskymap, page 1, from the Stilts commands manual. she Calculates sky density maps and honestly? she's iconic for it π
β¨ NAME β¨
stilts-tskymap β Calculates sky density maps.
that's the whole job description, no notes, she ate π
π SYNOPSIS π
stilts tskymap [ifmt=<in-format>] [istream=true|false] [in=<table>]
[icmd=<cmds>] [ocmd=<cmds>]
[omode=out|meta|stats|count|checksum|cgi|discard|topcat|samp|tosql|gui]
[out=<out-table>] [ofmt=<out-format>] [lon=<expr/deg>]
[lat=<expr/deg>]
[tiling=hpx<K>|healpixnest<K>|healpixring<K>|htm<K>]
[count=true|false] [cols=<expr>[;<combiner>[;<name>]]
...] [combine=sum|sum-per-unit|count|count-per-
unit|mean|median|Q1|Q3|min|max|stdev|stdev_pop|hit]
[perunit=steradian|degree2|arcmin2|arcsec2|mas2|uas2]
[complete=true|false]
[runner=sequential|parallel|parallel<n>|partest]
π« DESCRIPTION π«
ngl, here's the vibe: tskymap calculates a weighted density map β or, if you wanna say it the other way, a histogram β up on the sky, using columns from an input table π
The sky gets sliced up into some discrete set of tiles according to whatever tessellation scheme you picked (currently HEALPix or HTM are supported, that's the roster), and the quantities you asked for get aggregated into bins that correspond to those tiles. So the output table has a column giving the pixel index that identifies each tile, plus one or more other columns, each one being an aggregation of a quantity from the input table π
By default, the number of rows from the input table that landed inside each tile gets included as the first column of the output table. But if you specify the cols and combine parameters, you can stack on more columns giving the sum, mean, median or other statistics of input table columns or expressions too β¨
Once you have that output table, you can do stuff like plot it with plot2sky's healpix layer type (though an alternative is to just do that plot directly with a skydensity layer). Either way, cute π
If we're talking HEALPix tiling specifically, the result can also be written out to a FITS file suitable for external applications that understand the semi-standard FITS-Healpix convention. Note β and this bit matters β in that case, for maximum compatibility, the fits-healpix output format should in general be used π
Also go say hi to tgridmap, which does the exact same thing but for N-dimensional grid geometry π«Ά
πΈ OPTIONS πΈ
ifmt=<in-format>β Says what format the input table (the one in parameterin) is in. The known formats are all listed in SUN/256. Use this flag when you already know what format your table is. If it's set to the special value(auto)β which is the default β then the program will attempt to figure out the format all by itself π It can't always get this right though, and when it can't, the program exits with an error explaining which formats it tried. Oh, and heads up: this parameter is ignored for scheme-specified tables.istream=true|falseβ If you set ittrue, the input table from theinparameter gets read as a stream. You have to give theifmtparameter if you do this. Depending on what operations you asked for and what processing mode you're in, this may make the read fail (sometimes the table genuinely has to be read more than once, sorry bestie π). It's not normally necessary to set this flag β in most cases the data streams automatically when that's the best thing to do. That said, it can sometimes mean less resource usage when you're processing large files in certain formats (VOTable, for instance). This parameter is ignored for scheme-specified tables.in=<table>β Where the input table lives. It can take any one of these forms:- A filename.
- A URL.
- The special value
-, which means standard input. In that case the input format must be given explicitly with theifmtparameter. Note that not all formats can be streamed this way. - A scheme specification shaped like
:<scheme-name>:<scheme-args>. - A system command line with either a
<character at the start, or a|character at the end ("<syscmd"or"syscmd|"). This runs the given pipeline and reads from its standard output. It'll probably only work on unix-like systems π§
In any case, compressed data in one of the supported compression formats (gzip, Unix compress or bzip2) gets decompressed transparently β¨
icmd=<cmds>β Processing to be performed on the input table (the one in parameterin), before any other processing has happened. The value is one or more of the filter commands described in SUN/256. If you give more than one, they have to be separated by semicolon characters (;). You can repeat this parameter multiple times on the same command line to build up a list of processing steps, and the sequence of commands you give defines the processing pipeline that gets performed on the table π
Commands can alternatively be supplied in an external file using the indirection character @. So a value of "@filename" makes the file filename get read for a list of filter commands to execute. Commands in that file may be separated by newline characters and/or semicolons, and lines that are blank or that start with a # character are ignored. A backslash character '\fR' at the end of a line joins it with the following line.
ocmd=<cmds>β Processing to be performed on the output table, after all other processing has taken place. The value is one or more of the filter commands described in SUN/256. If you give more than one, they have to be separated by semicolon characters (;). You can repeat this parameter multiple times on the same command line to build up a list of processing steps, and the sequence of commands you give defines the processing pipeline that gets performed on the table π
Commands can alternatively be supplied in an external file using the indirection character @. So a value of "@filename" makes the file filename get read for a list of filter commands to execute. Commands in that file may be separated by newline characters and/or semicolons, and lines that are blank or that start with a # character are ignored. A backslash character '\fR' at the end of a line joins it with the following line.
omode=out|meta|stats|count|checksum|cgi|discard|topcat|samp|tosql|guiβ The mode the result table gets output in. Default isout, which means the result gets written as a new table to disk or wherever, as decided by theoutandofmtparameters. But there are other possibilities β they line up with other uses a table can be put to besides outputting it, like displaying metadata, calculating statistics, or populating a table in an SQL database. For some values of this parameter you also need extra parameters (<mode-args>) to nail down the exact behaviour.
The possible values are:
outmetastatscountchecksumcgidiscardtopcatsamptosqlgui
Use the help=omode flag or see SUN/256 for more info π«Ά
out=<out-table>β Where the output table goes. Usually a filename to write to. If it's the special value-(which is the default), the output table gets written to standard output.
bestie, you only give this parameter ifomodehas its default value of"out"β οΈ
ofmt=<out-format>β What format the output table gets written in (one of the ones in SUN/256 β matching is case-insensitive and you can get away with just the first few letters). If it's the special value(auto)(the default), then the output filename gets examined to try and guess what sort of file is wanted, usually by peeking at the extension. If it's not obvious from the filename what output format is intended, you get an error π
same deal: only give this parameter ifomodehas its default value of"out"β οΈ
lon=<expr/deg>β Longitude in degrees for the position of each row in the input table. This can just be a column name, or it can be an algebraic expression, as explained in SUN/256. The sky system used here is what determines the grid the output map gets built on πlat=<expr/deg>β Latitude in degrees for the position of each row in the input table. Again, this can just be a column name, or it can be an algebraic expression, as explained in SUN/256. The sky system used here is what determines the grid the output map gets built on πtiling=hpx<K>|healpixnest<K>|healpixring<K>|htm<K>β Describes the sky tiling scheme in use. You can pick one of these:hpxK: alias forhealpixnestKhealpixnestK: HEALPix using the Nest scheme at order KhealpixringK: HEALPix using the Ring scheme at order KhtmK: Hierarchical Triangular Mesh at level K
So for example, hpx5 and healpixnest5 would both mean the HEALPix NEST tiling scheme at order 5 β¨
At level K, there are 12*4^K HEALPix pixels, or 8*4^K HTM pixels on the sky. More information about these tiling schemes can be found at the HEALPix and HTM web sites π
count=true|falseβ Controls whether aCOUNTcolumn gets added to the output table alongside any other columns you may have requested. If it's included, it reports the number of rows from the input table that fell within the corresponding bin π’cols=<expr>[;<combiner>[;<name>]] ...β Defines the quantities to be calculated. The value is a space-separated list of items, one for each aggregated column in the output table.
Each item is made up of one, two or three tokens, separated by semicolon (;) characters:
<expr>: (required) column name or expression using the expression language, for the quantity to be aggregated.
bestie that list is not done, there's more of this coming in the next part β¨
<combiner>β (optional) which combination method to use, taking the exact same options as thecombineparameter. Leave it out and the value you set for that parameter gets used instead. β¨<name>β (optional) the name of the output column. Omit it and the<expr>value gets used (maybe a little sanitised, ngl). π
Most of the time you can lowkey just hand over a space-separated list of input table column names here and that's it, bestie. But sometimes you need the extra syntax β like when you've gotta calculate both a sum and a mean of the same input column. That's the moment the fancy form earns its keep. π«Ά
combine=sum|sum-per-unit|count|count-per-unit|mean|median|Q1|Q3|min|max|stdev|stdev_pop|hitβ sets the default way that all the values landing in the same density map bin get squished together into the one value that bin ends up with. Here's the whole menu:sumβ the sum of all the combined values per bin πsum-per-unitβ the sum of all the combined values per unit of bin sizecountβ the number of non-blank values per bin (the weight is ignored, she's not invited π)count-per-unitβ the number of non-blank values per unit of bin size (again, weight is ignored)meanβ the mean of the combined valuesmedianβ the medianQ1β first quartileQ3β third quartileminβ the minimum of all the combined valuesmaxβ the maximum of all the combined valuesstdevβ the sample standard deviation of the combined valuesstdev_popβ the population standard deviation of the combined valueshitβ1if any values are present,NaNotherwise (weight ignored, obviously π)Q.nnnβ quantile nnn (so like,Q.05is the fifth percentile, periodt)
For the density-like ones (count-per-unit, sum-per-unit) the scaling also gets nudged by the perunit parameter. π
Heads up bestie: this value can be overridden on a per-column basis by the cols parameter. So your global vibe can be quietly changed locally, iykyk.
perunit=steradian|degree2|arcmin2|arcsec2|mas2|uas2β picks the unit of sky area used to scale density-like combinations (thinkcombine=count-per-unitorsum-per-unit). If the combination mode is doing values per unit area, this is what configures the area scale in question. For the non-density-like modes (likecombine=sumormean) it literally does nothing, no cap. π¦
The options are:
steradianβ steradian β¨degree2β square degreearcmin2β square arcminutearcsec2β square arcsecondmas2β square milliarcsecuas2β square microarcsec
complete=true|falseβ decides whether the output table has a row for every pixel in the tiling, or only the rows for pixels that some of the input data actually fell into. π§
This one affects performance as well as output, so listen up. If you already know most pixels on the sky are gonna be covered, setting it true is probably the move. And if you know only a small patch of sky is getting covered, false is the better call. Choose wisely π
runner=sequential|parallel|parallel<n>|partestβ chooses the threading implementation, i.e. how much of the processing actually happens in parallel. Right now the options are:sequentialβ runs using only a single thread πparallelβ runs using multiple threads for large tables, with the parallelism given by the number of available processorsparallel<n>β runs using multiple threads for large tables, with the parallelism given by the value n you supplypartestβ runs using multiple threads even when tables are small (only intended for testing purposes, don't get comfy with it π)
Going parallel can speed things up considerably, bestie. But depending on the I/O operations required, it can also slow you all the way down by disrupting patterns of disk access. π If a file's content lives on a solid state disk, or is already in cache β say, because a similar command ran recently β then parallel will probably be faster. But if the data is being read directly off a spinning disk, like when the file is too large to fit in RAM, then sequential or parallel<n> with a small n may be faster. It's giving β¨situationalβ¨.
This parameter should make only very tiny differences to the output table. If you notice significant discrepancies, please report them. π₯
πΈ SEE ALSO πΈ
If the package stilts-doc is installed, the full documentation SUN/256 is available in HTML format at:
file:///usr/share/doc/stilts/sun256/index.html
π VERSION π
STILTS version 3.5.4-debian
This is the Debian version of Stilts, which lacks the support of some file formats and network protocols. For differences, see:
file:///usr/share/doc/stilts/README.Debian
π AUTHOR π
Mark Taylor (Bristol University)
Okay bestie that's the whole page, we ate and left no crumbs π It's the STILTS 3.5.4-debian flavour, dated Mar 2017, and yes β it really does call itself STILTS-TSKYMAP(1). Go map some sky, you main character. βπ
π¦ where this page comes from
- ubuntu stonking: stilts 3.5.4-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms