Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit44edb5c

Browse files
committed
Adding documentation for epoch propagation.
Also, fixing upgrade script generation.
1 parent2cfc44d commit44edb5c

File tree

2 files changed

+131
-5
lines changed

2 files changed

+131
-5
lines changed

‎Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ DATA_built = $(RELEASE_SQL) \
1919
pg_sphere--1.1.5beta0gavo--1.1.5beta2gavo.sql\
2020
pg_sphere--1.1.5beta2gavo--1.1.5beta4gavo.sql\
2121
pg_sphere--1.1.5beta4gavo--1.2.0.sql\
22+
pg_sphere--1.1.5beta4gavo--1.2.0.sql\
2223
pg_sphere--1.2.0--1.2.1.sql
2324

2425
DOCS = README.pg_sphere COPYRIGHT.pg_sphere
@@ -198,12 +199,9 @@ pg_sphere--1.1.5beta4gavo--1.2.0.sql: pgs_moc_ops.sql.in
198199
cat$^>$@
199200
ifeq ($(has_parallel), n)
200201
sed -i -e '/PARALLEL/d' $@# version $(pg_version) does not have support for PARALLEL
201-
202-
pg_sphere--1.2.0-1.2.1.sql: pgs_epochprop.sql.in
203-
cat upgrade_scripts/$@.in$^>$@
204202
endif
205203

206-
pg_sphere--1.2.0--1.2.1.sql: pgs_moc_geo_casts.sql.in
204+
pg_sphere--1.2.0--1.2.1.sql: pgs_moc_geo_casts.sql.in pgs_epochprop.sql.in
207205
cat$^>$@
208206
ifeq ($(has_parallel), n)
209207
sed -i -e '/PARALLEL/d' $@# version $(pg_version) does not have support for PARALLEL

‎doc/functions.sgm

Lines changed: 129 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,5 +667,133 @@
667667
</example>
668668

669669
</sect2>
670-
670+
671+
<sect2 id="funcs.epochprop">
672+
<title>
673+
Epoch propagation
674+
</title>
675+
676+
<sect3 id="funcs.epochprop.full">
677+
<title>6-Parameter Epoch Propagation</title>
678+
<funcsynopsis>
679+
<funcprototype>
680+
<funcdef><type>double precision[6]</type>
681+
<function>epoch_prop</function></funcdef>
682+
<paramdef>spoint <parameter>pos</parameter></paramdef>
683+
<paramdef>double precision <parameter>parallax</parameter></paramdef>
684+
<paramdef>double precision <parameter>pm_long</parameter></paramdef>
685+
<paramdef>double precision <parameter>pm_lat</parameter></paramdef>
686+
<paramdef>double precision <parameter>radial_velocity</parameter></paramdef>
687+
<paramdef>double precision <parameter>delta_t</parameter></paramdef>
688+
</funcprototype>
689+
</funcsynopsis>
690+
<para>
691+
Propagates a spherical phase vector in time (in particular,
692+
applies proper motion to positions)
693+
</para>
694+
<para>
695+
Following both pg_sphere and, where missing, astronomical
696+
conventions makes units somewhat eclectic here; pm_long and pm_lat
697+
need to be in rad/yr, whereas parallax is in mas, and
698+
radial_velocity in km/s. The time difference must be in
699+
(Julian) years.
700+
</para>
701+
702+
<para>
703+
This function returns a 6-array of [long, lat, parallax,
704+
pm_long, pm_lat, radial_velocity] of the corresponding values
705+
delta_t years after the reference epoch for the original position.
706+
As in the function arguments, long and lat are in rad, pm_lon and
707+
pm_lat are in rad/yr, parallax is in mas, and radial_velocity is
708+
in km/s. If you are only interested in the position, consider
709+
the epoch_prop_pos functions below that have a somewhat less
710+
contorted signature.
711+
</para>
712+
713+
<para>
714+
It is an error to have either pos or delta_t NULL. For all
715+
other arguments, NULLs are turned into 0s, except for parallax,
716+
where some very small default is put in. In that case,
717+
both parallax and radial_velocity will be NULL in the output
718+
array.
719+
</para>
720+
721+
<para>
722+
This uses the rigorous method derived in "The Hipparcos and Tycho
723+
Catalogues", ESA Special Publication 1200 (1997), p 94f. It does
724+
not take into account relativistic effects, and it also does not
725+
account for secular aberration.
726+
</para>
727+
<example>
728+
<title>Propagating Barnard's star into the past</title>
729+
<programlisting><![CDATA[
730+
SELECT
731+
to_char(DEGREES(tp[1]), '999D9999999999'),
732+
to_char(DEGREES(tp[2]), '999D9999999999'),
733+
to_char(tp[3], '999D999'),
734+
to_char(DEGREES(tp[4])*3.6e6, '999D999'),
735+
to_char(DEGREES(tp[5])*3.6e6, '99999D999'),
736+
to_char(tp[6], '999D999')
737+
FROM (
738+
SELECT epoch_prop(
739+
spoint(radians(269.45207695), radians(4.693364966)), 546.9759,
740+
RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110,
741+
-100) AS tp) AS q;
742+
to_char | to_char | to_char | to_char | to_char | to_char
743+
-----------------+-----------------+----------+----------+------------+----------
744+
269.4742714391 | 4.4072939987 | 543.624 | -791.442 | 10235.412 | -110.450
745+
]]></programlisting>
746+
</example>
747+
748+
</sect3>
749+
<sect3>
750+
<title>Epoch Propagation of Positions Only</title>
751+
<funcsynopsis>
752+
<funcprototype>
753+
<funcdef><type>spoint</type>
754+
<function>epoch_prop_pos</function></funcdef>
755+
<paramdef>spoint <parameter>pos</parameter></paramdef>
756+
<paramdef>double precision <parameter>parallax</parameter></paramdef>
757+
<paramdef>double precision <parameter>pm_long</parameter></paramdef>
758+
<paramdef>double precision <parameter>pm_lat</parameter></paramdef>
759+
<paramdef>double precision <parameter>radial_velocity</parameter></paramdef>
760+
<paramdef>double precision <parameter>delta_t</parameter></paramdef>
761+
</funcprototype>
762+
</funcsynopsis>
763+
<funcsynopsis>
764+
<funcprototype>
765+
<funcdef><type>spoint</type>
766+
<function>epoch_prop_pos</function></funcdef>
767+
<paramdef>spoint <parameter>pos</parameter></paramdef>
768+
<paramdef>double precision <parameter>pm_long</parameter></paramdef>
769+
<paramdef>double precision <parameter>pm_lat</parameter></paramdef>
770+
<paramdef>double precision <parameter>delta_t</parameter></paramdef>
771+
</funcprototype>
772+
</funcsynopsis>
773+
<para>
774+
These are simplified versions of epoch_prop returning only spoints;
775+
the propagated values for the other coordinates are discarded
776+
(but still internallay computed; these functions do not
777+
run any faster than epoch_prop itself).
778+
</para>
779+
780+
<para>
781+
As with epoch_prop itself, missing values (except for pos and
782+
delta_t) are substituted by 0 (or a very small value in the
783+
case of parallax).
784+
</para>
785+
<example>
786+
<title>Barnard's star, position and proper motion</title>
787+
<programlisting><![CDATA[
788+
SELECT epoch_prop_pos(
789+
spoint(radians(269.45207695), radians(4.693364966)),
790+
RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6),
791+
20) AS tp;
792+
tp
793+
-----------------------------------------
794+
(4.70274793061952 , 0.0829193989380876)
795+
]]></programlisting>
796+
</example>
797+
</sect3>
798+
</sect2>
671799
</sect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp