MTILEHDR(1)
π MTILEHDR β bestie edition π
okay so this is mTileHdr, and it lives in the Montage manual (section 1, obvs). pull up a chair, we're gonna tile some headers β¨
πΈ NAME πΈ
mTileHdr β Create a set of tiled images or header templates from a FITS file or header π¦
π SYNOPSIS π
mTileHdr [-d] [-s statusfile] orig.hdr new.hdr nx ny ix iy [xpad [ypad]]
that's it. that's the whole vibe. periodt π
β¨ DESCRIPTION β¨
so what this icon does is: it takes a header template file and spits out another one, and that new one represents one specific tile out of a regular grid of tiles covering the original. you tell it how the grid is laid out, and you tell it which tile you want. that's the whole job. slay.
and here's the key thing, the only lines that get changed are the NAXIS and CRVAL keyword lines β that's the pixel size and the reference point location, iykyk. every other keyword value? inherited straight from the input header. no notes. π
π OPTIONS π
-dβ turns on debugging. yes queen, show us the tea π«-sstatusfile β output and errors get sent to statusfile instead of going tostdout. so if you don't want the noise in your terminal, this is your girl π
π¦ ARGUMENTS π¦
orig.hdrβ the ASCII header template you're deriving your tiled headers from. the source material. the blueprint πΈnew.hdrβ the path to the output header. where the magic lands β¨nxβ number of tiles in the x-directionnyβ number of tiles in the y-directionixβ integer identifying the x location of the output tile on the grid (and bestie, it counts from0π)iyβ integer identifying the y location of the output tile on the grid (also counting from0, we're programmers here)xpadβ number of pixels to overlap tiles in the x direction (optional; default is0)ypadβ number of pixels to overlap tiles in the y direction (optional; default is0)
π RESULT π
[struct stat="OK", naxis1=xsize, naxis1=ysize, crpix1=xref, crpix2=yref]
where xsize and ysize are the x and y dimensions of the image described by the output header, and crpix1 and crpix2 are the new offset from the original reference pixel on the sky. look at that struct. gorgeous. π«Ά
β MESSAGES β
OKβ[struct stat="OK", naxis1=xsize, naxis2=ysize, crpix1=xref, crpix2=yref]ERRORβCannot open status file: statusfileERRORβ(nx,ny) have to be positive integers and (ix,iy) have to be in the range (0..nx-1, 0..ny-1)ERRORβCannot open output template new.hdrERRORβBad template:orig.hdrERRORβBad template:new.hdrERRORβOutput wcsinit() failed.
like, read them. they're very self-explanatory. they ate π
π§ EXAMPLES π§
okay so say template.hdr is 850x850 pixels, and we want to generate the center tile out of 9 (that's 3 by 3):
$ mTileHdr template.hdr tile_1_1.hdr 3 3 1 1
[struct stat="OK", naxis1=283, naxis2=283, crpix1=-283,
crpix2=-283]
and tile_1_1.hdr ends up with the same reference location and pixel scale as the input header, but a brand new pixel offset (CRPIX) and size (NAXIS). it's giving glow-up. β¨
π BUGS π
listen, we gotta be honest with each other here.
- The drizzle algorithm has been implemented but has not been tested in this release. soβ¦ it exists. we don't know if it works. lowkey terrifying ngl π
- If a header template contains carriage returns (i.e., created/modified on a Windows machine), the cfitsio library will be unable to read it properly, resulting in the error:
[struct stat="ERROR", status=207, msg="illegal character in keyword"]. so yeah. windows line endings will simply ruin your day. π - It is best for the background correction algorithms if the area described in the header template completely encloses all of the input images in their entirety. If parts of input images are "chopped off" by the header template, the background correction will be affected. We recommend you use an expanded header for the reprojection and background modeling steps, returning to the originally desired header size for the final coaddition. The default background matching assumes that there are no non-linear background variations in the individual images (and therefore in the overlap differences). If there is any uncertainty in this regard, it is safer to turn on the "level only" background matching (the
-lflag inmBgModel).
that last one is a whole paragraph but it's important, so we're keeping every word of it, fr fr. π«‘
π COPYRIGHT π
2001-2015California Institute of Technology, Pasadena, California- If your research uses Montage, please include the following acknowledgement: "This research made use of Montage. It is funded by the National Science Foundation under Grant Number ACI-1440620, and was previously funded by the National Aeronautics and Space Administration's Earth Science Technology Office, Computation Technologies Project, under Cooperative Agreement Number NCC5-626 between NASA and the California Institute of Technology."
- The Montage distribution includes an adaptation of the MOPEX algorithm developed at the Spitzer Science Center.
k that's the whole page bestie, mwah π
this was Montage 5, dated Dec 2016 β thanks for reading, you're the main character of this manpage now, bye ππ¦β¨
π¦ where this page comes from
- debian bookworm: montage 6.0+dfsg-7+b8 Β· BSD-3-Clause
- debian trixie: montage 6.1+dfsg-1+b1 Β· BSD-3-Clause
- ubuntu jammy: montage 6.0+dfsg-7build5 Β· BSD-3-Clause
- ubuntu noble: montage 6.0+dfsg-9 Β· BSD-3-Clause
- ubuntu questing: montage 6.1+dfsg-2
- ubuntu resolute: montage 6.1+dfsg-2build2 Β· BSD-3-Clause
- ubuntu stonking: montage 6.1+dfsg-2build2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms