Astro-XSPEC-TableModel
view release on metacpan or search on metacpan
lib/Astro/XSPEC/TableModel.pm view on Meta::CPAN
my $row = 0;
my $npars = 1;
my $nbins = @energy - 1;
for my $ol ( 0..10 )
{
$row++;
my @spectrum = map { 1 + $ol**2 * $_ } @energy;
$fptr->write_col_dbl( 1, $row, 1, $npars, [ $ol ], $status );
$fptr->write_col_dbl( 2, $row, 1, $nbins, \@spectrum, $status );
}
$fptr->close_file( $status )
=head1 DIAGNOSTICS
Astro::XSPEC::TableModel will B<croak> upon error.
=over
=item C<< %s parameter %s: missing attributes: %s >>
The parameter specification is incomplete and is missing the listed attributes.
=item C<< %s parameter %s: illegal extra attributes: %s >>
The parameter specification has extra, unrecognized attributes.
=item C<< Error creating %s: %s >>
CFITSIO was unable to create the file for the given reason.
=item C<< Error creating %s HDU: %s >>
CFITSIO was unable to create the specified HDU for the given reason.
=back
Some error messages will be returned directly from the CFITSIO FITS library;
see its documentation for their meaning.
=head1 CONFIGURATION AND ENVIRONMENT
Astro::XSPEC::TableModel requires no configuration files or
environment variables.
=head1 DEPENDENCIES
List::Util,
Params::Validate,
Astro::FITS::CFITSIO,
Astro::FITS::CFITSIO::CheckStatus,
Astro::FITS::Header.
=head1 INCOMPATIBILITIES
None reported.
=head1 BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests to
C<bug-astro-xspec-tablemodel@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Astro-XSPEC-TableModel>.
=head1 SEE ALSO
B<XSPEC> is documented at L<http://heasarc.nasa.gov/docs/xanadu/xspec/>.
The B<XSPEC> Table Model is documented at L<ftp://legacy.gsfc.nasa.gov/caldb/docs/memos/ogip_92_009/>.
=head1 ACKNOWLEDGEMENTS
The code in F<wftbmd.c> (shipped with XSPEC) was invaluable.
=head1 VERSION
Version 0.01
=head1 LICENSE AND COPYRIGHT
Copyright (c) 2008 The Smithsonian Astrophysical Observatory
Astro::XSPEC::TableModel is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
=head1 AUTHOR
Diab Jerius E<lt>djerius@cpan.orgE<gt>
( run in 2.247 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )