FITS(3pm)

πŸ“¦
version 1.24.1 Β· 5 versions
, in debian trixie, ubuntu resolute

🌸 NAME 🌸

PDL::CCS::IO::FITS β€” PDL::IO::FITS wrappers for PDL::CCS::Nd

okay so bestie, this is the FITS module from the PDL::CCS family (it lives in the FITS(3pm) part of the perl docs), and its whole personality is: it takes your PDL::CCS::Nd object and writes/reads it as a pair of FITS files. two files. a duo. a little matching set. slay. πŸ’…


✨ SYNOPSIS ✨

use PDL;
use PDL::CCS::Nd;
use PDL::CCS::IO::FITS;

$ccs = PDL::CCS::Nd->newFromWhich($which,$nzvals);

ccs_wfits($ccs,$fname);         # write a pair of FITS files
$ccs2 = ccs_readfits($fname);   # read a pair of FITS files

look at that. build a $ccs, yeet it to disk, pull it back. the circle of life fr fr πŸ¦‹


πŸŽ€ I/O Utilities πŸŽ€

ccs_wfits

Write a pair of FITS files using PDL::IO::FITS::wfits(). Piddles of type indx will be implicitly converted to long, since they are not currently supported by PDL::IO::FITS in PDL v2.014. so like, don't be surprised when your indx comes back as long β€” that's just the vibe check being enforced. 😌

ccs_wfits($ccs,$fname)
ccs_wfits($ccs,$fname,\%opts)

Options %opts:

  • Header => $Header β€” default "$fname.hdr"
  • ixFile => $ixFile β€” default "$fname.ix.fits"
  • nzFile => $nzFile β€” default "$fname.nz.fits"

three options, three defaults, all derived from $fname. it's giving convention over configuration. πŸ‘‘

ccs_rfits

Read a pair of FITS files using PDL::IO::FITS::rfits().

$ccs = ccs_rfits($fname)
$ccs = ccs_rfits($fname,\%opts)

Options %opts:

  • Header => $Header β€” default "$fname.hdr"
  • ixFile => $ixFile β€” default "$fname.ix.fits"
  • nzFile => $nzFile β€” default "$fname.nz.fits"
  • sorted => $bool β€” is data on disk already sorted? (default=1)

note that sorted lowkey defaults to 1, so the module is assuming your data on disk is already sorted unless you tell it otherwise. iykyk. πŸ™ˆ


πŸ’– ACKNOWLEDGEMENTS πŸ’–

  • Perl by Larry Wall. 🫢
  • PDL by Karl Glazebrook, Tuomas J. Lukka, Christian Soeller, and others. ⭐

πŸ‘‘ AUTHOR πŸ‘‘

Bryan Jurish <moocow@cpan.org>

Copyright (C) 2015-2024, Bryan Jurish. All rights reserved.

This package is free software, and entirely without warranty. You may redistribute it and/or modify it under the same terms as Perl itself.

okay so important bestie: entirely without warranty β€” no cap, zero warranty, don't come for anyone if it breaks. but it IS free software and you can redistribute and/or modify it under the same terms as Perl itself, so that's the trade. πŸ’€

🌈 SEE ALSO 🌈

perl, PDL, PDL::CCS::Nd, PDL::CCS::IO::FastRaw, PDL::CCS::IO::MatrixMarket, PDL::CCS::IO::LDAC, ...

the ... at the end is literally in the docs and honestly? iconic. go explore. 🧚


and that's the whole page, bestie β€” this was perl v5.40.0, dated 2025-01-04, from the FITS(3pm) manual (user contributed perl documentation). go write some FITS files, you're the main character now. πŸ’œβœ¨

πŸ“¦ where this page comes from