Skip to content

Commit 046a50c

Browse files
committed
epoch_prop: Now copying through RV whenever the parallax is not valid.
1 parent 3366ce3 commit 046a50c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

expected/epochprop.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ FROM (
3030
-100) AS tp) AS q;
3131
to_char | to_char | to_char | to_char | to_char | to_char
3232
-----------------+-----------------+----------+----------+------------+----------
33-
269.4744079540 | 4.4055337210 | .000 | -801.210 | 10361.762 | -###.###
33+
269.4744079540 | 4.4055337210 | .000 | -801.210 | 10361.762 | -110.000
3434
(1 row)
3535

3636
SELECT

src/epochprop.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ epoch_prop(PG_FUNCTION_ARGS) {
177177

178178
propagate_phasevec(&input, delta_t, &output);
179179

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

0 commit comments

Comments
 (0)