|
7 | 7 | * |
8 | 8 | * This file part of: SCAMP |
9 | 9 | * |
10 | | -* Copyright: (C) 2002-2024 IAP/CNRS/SorbonneU/CEA/UParisSaclay |
| 10 | +# Copyright: (C) 2002-2021 IAP/CNRS/SorbonneU |
| 11 | +# (C) 2021-2023 CFHT/CNRS |
| 12 | +* (C) 2023-2025 CEA/AIM/OSUPS |
11 | 13 | * |
12 | 14 | * License: GNU General Public License |
13 | 15 | * |
|
22 | 24 | * You should have received a copy of the GNU General Public License |
23 | 25 | * along with SCAMP. If not, see <http://www.gnu.org/licenses/>. |
24 | 26 | * |
25 | | -* Last modified: 25/03/2024 |
| 27 | +* Last modified: 09/07/2025 |
26 | 28 | * |
27 | 29 | *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ |
28 | 30 |
|
@@ -1314,8 +1316,8 @@ INPUT Set structure pointer, |
1314 | 1316 | OUTPUT setstruct pointer (allocated if the input setstruct pointer is NULL). |
1315 | 1317 | NOTES The filename is used for error messages only. Global preferences are |
1316 | 1318 | used. |
1317 | | -AUTHOR E. Bertin (IAP) |
1318 | | -VERSION 28/06/2020 |
| 1319 | +AUTHOR E. Bertin (CEA/OSUPS) |
| 1320 | +VERSION 09/07/2025 |
1319 | 1321 | */ |
1320 | 1322 | setstruct *read_astrefsamples(setstruct *set, tabstruct *tab, char *rfilename, |
1321 | 1323 | double *wcspos, int lng, int lat, int naxis, |
@@ -1543,6 +1545,10 @@ setstruct *read_astrefsamples(setstruct *set, tabstruct *tab, char *rfilename, |
1543 | 1545 | sample->set = set; |
1544 | 1546 | sample->sexflags = objflags; |
1545 | 1547 | sample->mag = mag? mag[band] : dmag[band]; |
| 1548 | +#ifdef HAVE_ISNAN2 |
| 1549 | + if (isnan(sample->mag)) |
| 1550 | + sample->mag = maglim[1]; |
| 1551 | +#endif |
1546 | 1552 | sample->magerr = magerr? magerr[band] : (dmagerr? dmagerr[band] : 0.0); |
1547 | 1553 | sample->epoch = dobsdate? *dobsdate : (obsdate? *obsdate : 0.0); |
1548 | 1554 | sample->flux = 0.0; |
|
0 commit comments