Skip to content

dkechag/Astro-Coord-Precession

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Astro::Coord::Precession - Precess coordinates between 2 epochs

VERSION

Version 0.03

SYNOPSIS

use Astro::Coord::Precession qw/precess precess_rad read_coordinates/;

# If you have coordinates in float RA hours and Dec degrees:
my $precessed = precess([$RA, $dec], $epoch_from, $epoch_to);
   
# If you have coordinates in rad:
my $precessed_rad = precess([$RA_rad, $dec_rad], $epoch_from, $epoch_to);

# If you have coordinates in strings with RA h,m,s and Dec deg etc:
my $coord = read_coordinates(['01 33 50.904', '+30 39 35.79']);
my $precessed = precess($coord, 2000, 2021.15);

DESCRIPTION

A very simple, pure Perl module to precess equatorial coordinates from one epoch to another, based on the algorithm P. Herget used in the Publications of the Cincinnati Observatory.

METHODS

precess

my $precessed = precess($coord, $epoch_from, $epoch_to);

Returns an arrayref [$RA, $dec] with equatorial coordinates (0 <= RA < 24 in hours, -90 <= Dec <= 90 in degrees), precessed from $epoch_from (e.g. 2000) to $epoch_to.

$coord input is similarly arrayref with RA in hours, Dec in degrees.

precess_rad

my $precessed_rad = precess($coord, $epoch_from, $epoch_to);

Returns an arrayref [$RA, $dec] with equatorial coordinates in rad, precessed from $epoch_from (e.g. 2000) to $epoch_to.

The precess function converts from/to rad anyway, so use this if you can work with rad directly.

UTILITY FUNCTIONS

read_coordinates

my $coord = read_coordinates([$ra_string, $dec_string]);

Returns coordinates in an arrayref of RA, dec in decimal values to use with precess. It accepts commonly used strings for RA, dec in hours and degrees respectivelly:

  • $ra_string

    It will read a string with hours, minutes, secs like '2 30 00' or '2h30m30s' or '02:30:30' etc. Single/double quotes and single/double prime symbols are accepted for denoting minute, second in place of a single space/tab which also works. Will accept negative too with preceding -, even though this is unusual and also no seconds part.

  • $dec_string

    It will read a string with degrees, minutes, secs like '+54 30 00' or '54°30m30s' etc. Single/double quotes and single/double prime symbols are accepted for denoting minute, second in place of a single space/tab which also works. Will also accept no arc seconds part.

AUTHOR

Dimitrios Kechagias, <dkechag at cpan.org>

BUGS

Please report any bugs or feature requests to bug-astro-coord-precession at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Astro-Coord-Precession. You could also raise issues or submit PRs to the github repo below.

GIT

https://github.com/dkechag/Astro-Coord-Precession

ACKNOWLEDGEMENTS

Based on the precession function from the fortran program CONFND, made by FO @ CDS (francois@simbad.u-strasbg.fr).

LICENSE AND COPYRIGHT

This software is copyright (c) 2021 by Dimitrios Kechagias.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

About

Perl module to precess coordinates between 2 epochs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published