Skip to content

Commit

Permalink
epoch_prop: Now copying through RV whenever the parallax is not valid.
Browse files Browse the repository at this point in the history
  • Loading branch information
msdemlei committed May 27, 2024
1 parent 3366ce3 commit 046a50c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion expected/epochprop.out
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ FROM (
-100) AS tp) AS q;
to_char | to_char | to_char | to_char | to_char | to_char
-----------------+-----------------+----------+----------+------------+----------
269.4744079540 | 4.4055337210 | .000 | -801.210 | 10361.762 | -###.###
269.4744079540 | 4.4055337210 | .000 | -801.210 | 10361.762 | -110.000
(1 row)

SELECT
Expand Down
4 changes: 2 additions & 2 deletions src/epochprop.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ epoch_prop(PG_FUNCTION_ARGS) {

propagate_phasevec(&input, delta_t, &output);

/* If we have a null parallax but a good RV, preserve the original,
/* If we have an invalid parallax but a good RV, preserve the original,
untransformed RV on output. See
https://github.com/ivoa-std/udf-catalogue/pull/20#issuecomment-2115053757
for the rationale. */
if (!PG_ARGISNULL(4) && PG_ARGISNULL(1)) {
if (!PG_ARGISNULL(4) && !input.parallax_valid) {
output_null[5] = 0;
output.rv = input.rv;
}
Expand Down

0 comments on commit 046a50c

Please sign in to comment.