PI - star catalogue usage
1. General description of star catalogue
PI star catalogue is based on two tables : STARS and MEASUREMENTS detailed description of
these tables can be found here. Table STARS contains all stars observed by
PI system
and table MEASUREMENTS
contains measurements of this stars on subsequent frames. Each record
of table MEASUREMENTS contains
link to table STARS ( field
star ) and FRAME ( field
id_frm).
2. Example databases
Specialy prepared database for testing reasons and recommended to be
used is :
http://grb.fuw.edu.pl/pi/catalog/heplx43/pidb_test/
From command line it can be accessed after logging to heplx43 machine :
ssh heplx43 -l
ogloza
psql pidb_test -U
pidb_guest
Nice example of light curves are : example_lc1,
example2
Another example is :
http://grb.fuw.edu.pl/pi/catalog/20050203_2
There is number of test databases available for pi-users , they can be
accessed by WWW interface from here :
http://grb.fuw.edu.pl/pi0/daq/curves/
There are computers on which database are available listed there. Final
database to analyse can be choosen according to description in file, for
example :
http://grb.fuw.edu.pl/pi0/daq/curves/heplx46/conf/conf20041215k2b
In case one wants to make custom analyse of stars in database he must
write C/C++ program or script to access data in database. And run it on
machine from which database is accessible
( heplx40 or machine were database is running - heplx46 in example
above ).
Example of such perl script which select stars and measurements in
field of 1 degree from given point (RA,DEC) is given here. Then
one must to login on desired machine as user piguest and run
program/script.
Of course program can be written in C/C++ or any other language for
which interface to POSTGRES database
exists.
3. Getting Started
After inspecting database through WWW interface, one wants to get data
and analyse it. The simples way is to login on machine heplx40 as user
piguest and run :
psql 20050203_2 -U pidb_guest -h heplx43
This allows to access database and see for example table definitions ,
by running :
\d frame
\d stars
\d measurements
Then one can run simple selection of stars :
SELECT * FROM STARS WHERE ra>=(
9.02867043-(1.00/15.00) ) AND ra<= (
9.02867043+(1.00/15.00) ) AND no_measurements>=80;
Then choose ID of one of the selected stars and see measurements :
SELECT * FROM MEASUREMENTS WHERE star=42135;
Then one can run example script , which can be found in piguest home
directory :
cd ~
./list_stars.pl -radius=0.001
And this is good example of accessing pi-catalog.
Another example is example.pl script.
4. Big database
Big database containing catalogue of all nights since 20050701 .. is
available from heplx40 machine by :
psql 2004_2005 -U pidb_guest -h heplx47
or by editing list_stars.pl example script and changing line :
$dbh = DBI->connect ( "dbi:Pg:dbname=20050203_2;host=heplx43", "pidb_guest", "");
to :
$dbh = DBI->connect ( "dbi:Pg:dbname=2004_2005;host=heplx47", "pidb_guest", "");