sbailey / surveyqa

DESI Survey QA Dashboard
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Ordering bug in nightly skypath plot #21

Closed sbailey closed 5 years ago

sbailey commented 5 years ago

There is some ordering bug in the nightly skypath plots, such that the lines connecting the observations aren't in order of increasing MJD. e.g. from night 20191206: image The two observations in the lower right are expids 177,178 and 179,180 (i.e. back-to-back) and yet they are not directly connected by a line.

I suspect that the code is assuming that the exposures list is sorted by MJD (which it is in the original input) but that something else along the way is changing that order. Perhaps this join in get_skypathplot doesn't preserve original input order:

    tiles_and_exps = join(exposures, tiles['STAR_DENSITY', 'EXPOSEFAC', 'OBSCONDITIONS', 'TILEID'], keys='TILEID')

I think a tiles_and_exps.sort("MJD") would fix this, but please try adding that and testing to make sure that the displayed paths are indeed in increasing expid (and MJD) order.

sbailey commented 5 years ago

Fixed in PR #22 ; closing ticket.