FITS(3pm)
πΈ 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 Policy
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
- debian trixie: libpdl-ccs-perl 1.24.1-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpdl-ccs-perl 1.24.1-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms