NAME

Astro::Bibcode - Parse standardised astronomical journal bibcode

SYNOPSIS

use Astro::Bibcode;
$bib = new Astro::Bibcode( '2002MNRAS.336...14J' );

print $bib->journal(),"\n";
print $bib->volume(),"\n";
print $bib->year(),"\n";

DESCRIPTION

This module parses a standardised astronomical journal bibcode (see references at end of this documentation) and allows the individual parts to be extracted.

METHODS

Constructor

new

Create a new Astro::Bibcode object. This constructor can be called in a number of ways.

If a single argument is provided it is assumed to be a bibcode. This code will be parsed, if the parse fails the object will not be created.

$bib = new Astro::Bibcode( '1995MNRAS.276.1024J' );

THE REST OF THIS SECTION IS PROPOSED INTERFACE AND IS NOT IMPLEMENTED

If it is called without arguments an empty object will be created. Further calls to the bibcode method or the individual components will be required to configure the object.

$bib = new Astro::Bibcode;

If a series of hash arguments are provided, the object will be configured by calling the individual accessors in turn.

$bib = new Astro::Bibcode( journalcode => 'ApJ',
                           year => 2002,
                         );

NOTE THAT BIBCODE CREATION IS NOT YET IMPLEMENTED

Accessor Methods

bibcode

Returns the bibcode associated with this object. It will be generated from the other object attributes if undefined (which it will be after something in the object has changed).

$bib->bibcode( '1998adass...7..216J' );
$code = $bib->bibcode;

Can return undef if the bibcode did not pass verification (see verify_bibcode).

year

Year of publication.

$year = $bib->year;
journalcode

The Journal code associated with this bib code.

For the current list of journal codes see:

http://simbad.u-strasbg.fr/simjnl.pl

See the journal method in order to translate this code to a full journal name.

$jcode = $bib->journalcode;
classflag

Classification flag of this bib code. Current allowed values are:

B textbook
C catalog
M digited version
P preprint
R report or conference proceedings
T thesis
U unpublished

and also from ADS:

book => 'book'
work => 'workshop'
conf => 'conference proceeding'
symp => 'symposium'
rept => 'report'
meet => 'meeting'

Note that a null string is used to indicate a periodical.

$code = $bib->classflag;

See the class method for the translation.

volume

Volume number.

misc

Value of the miscellaneous field "M" used to remove ambiguity.

page

Page number.

initial

Either the first initial of the first author's last name, or ":" for no author. Also can be "%" to indicate that some of the other fields may be invalid.

General Methods

journal

Retrieve the full journal name.

$journal = $bib->journal;

Returns the code if the code can not be translated.

Does try to recognize ADS conference codes.

class

Retrieve the full name associated with the classification flag.

$class = $bib->class;

Returns undef if no name can be translated.

confcode

Returns the ADS conference code associated with this bibcode. Returns undef if this bibcode is not associated with a conference.

$confcode = $bib->confcode;

In some cases (eg 2000immm.proc...77G), a "proc" classification is used when the ADS standard seems to imply "conf" instead. This is taken into account when returning the confcode.

summary

Return a multi-line summary string describing the bibcode status.

$text = $bib->summary;
verify_bibcode

Given a bibcode, return false if the bibcode does not seem to be valid (e.g. it is the wrong lenght, first 4 characters are not digits), returns the bibcode in scalar context.

$ok = $bib->verify_bibcode( '1999adass...8...11E' );

In list context returns a hash consisting of the constituent (untranslated) parts of the bib code.

%parts = $bib->verify_bibcode( '1998SPIE.3357..548J' );

Since ADS is prone to replacing & with & in Journal codes due to HTML transport, this routine will reverse this.

Note that in some special cases a bibcode can be specified such that it is known not to match all the rules (last character is a '%'). In such cases only the length of the bicode is checked.

REFERENCES

Details on the bibcode standard can be obtained from

http://cdsweb.u-strasbg.fr/simbad/refcode.html

A complete description of the reference coding has been published as a chapter of the book "Information & On-Line Data in Astronomy", 1995, D. Egret and M. A. Albrecht (Eds), Kluwer Acad. Publ.

ADS seems to use non-standard bibcodes for meetings and conferences:

http://adsabs.harvard.edu/abs_doc/conferences.html

ADS Journal codes are here:

http://adsabs.harvard.edu/abs_doc/all_journals.html

but are not currently used.

NOTES

Currently the lookup tables for the journal translation and ADS conference proceedings are embedded in the module. There is no facility for triggering a remote update from the referenced web sites or for easily updating a configuration file as new codes are issued. This will probably change in future releases.

AUTHOR

Tim Jenness <tjenness@cpan.org>

COPYRIGHT

Copyright (C) 2004 Tim Jenness and the Particle Physics and Astronomy Research Council.

This program 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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place,Suite 330, Boston, MA 02111-1307, USA

SEE ALSO

Astro::ADS

1 POD Error

The following errors were encountered while parsing the POD:

Around line 2137:

=cut found outside a pod block. Skipping to next block.