Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.sai.msu.su/~megera/oddmuse/index.cgi/README_q3c
Дата изменения: Unknown Дата индексирования: Mon Apr 11 07:54:55 2016 Кодировка: Поисковые слова: solar eclipse |
Idea and realization by Sergey Koposov, Sternberg Astronomical Institute, Moscow University. General formulation and testing by Oleg Bartunov, Sternberg Astronomical Institute, Moscow University.
Contact:
The paper about concept and idea behind Q3C scheme is available from ADASS proceedings, 2005. Users of Q3C are kindly asked to cite it in publications (or other types of presentation).
The URL of the paper: http://lnfm1.sai.msu.ru/~math/docs/adass_proceedings2005.pdf
PostgreSQL version 8.1 and later, and ability to install contribution module.
Compilation should be simple, just
make
Functions:
Suppose, you have table with spatial coordinates - ra and dec columns. Important notice - q3c uses ra in degrees, so it might be need to use ra*15 everywhere !
psql your_db < q3c.sql
# CREATE INDEX q3c_mytable_idx ON mytable (q3c_ang2ipix(ra,dec));
# CLUSTER q3c_mytable_idx ON my_table;
# ANALYZE my_table;
# select * from mytable where q3c_radial_query(ra, dec, 2, 3, 1);
# SELECT * FROM mytable WHERE q3c_poly_query(ra, dec, '{0, 0, 2, 0, 2, 1, 0, 1}');
# SELECT * from table1 as a , table2 as b where q3c_join(a.ra, a.dec, b.ra, b.dec, 0.001);
If every object in the table1 have his own error circle (like with X-ray data for example) (suppose that the radius of that circle is the column "err"), then you can run the query:
# SELECT * from table1 as a , table2 as b where q3c_join(a.ra, a.dec, b.ra, b.dec, a.err);
# SELECT * FROM table1 AS a, table2 AS b WHERE q3c_ellipse_join(a.ra, a.dec, b.ra, b.dec, a.maj_ax, a.axis_ratio, a.PA);
where axis_ratio is the column with axis ratio of the ellipses and PA is the column with the positional angles of them, and maj_ax is the column with major axises of those ellipses.