Conversation
…e dir instead of astropy cache
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
==========================================
+ Coverage 86.73% 87.48% +0.74%
==========================================
Files 8 8
Lines 618 639 +21
==========================================
+ Hits 536 559 +23
+ Misses 82 80 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@burdorfmitchell this test might be up your alley once your prelim is behind you |
|
@burdorfmitchell -- If you get a chance to try this out, I'd really appreciate it! It should be the same interface as pyuvsim currently expects. |
|
Sorry for taking a bit to get to testing this, I'll take a look at it later tonight. I assume I should be running some lunar pyuvsim simulations and examining performance and output consistency between this pr and main. |
Co-authored-by: Leo Singer <leo.singer@ligo.org>
|
Hi @burdorfmitchell ; thanks for testing this out! Yes, if you have a reference lunar simulation and can compare the results with this branch to the results before, that would be very helpful. |
|
@aelanman can you please check that the pyuvdata, pyradiosky and pyuvsim tests pass with this branch installed? |
|
@bhazelton I've tested pyuvsim/data and pyradiosky with this branch, and can confirm all tests are passing. However, pyradiosky and pyuvdata have hooks in place to catch "SpiceUNKNOWNFRAME" exceptions, which should no longer be necessary since spiceypy will be removed. This may break in the GH workflow because lunarsky won't install spiceypy as a dependency. I don't remember exactly why I switched away from using astropy's |
|
@bhazelton Is this just waiting on @burdorfmitchell 's tests? Since I've confirmed this doesn't break the tests in the rest of the RASG packages, this should be ready to merge. I can open PRs to remove the spiceypy dependency in the other packages (tests no longer need it). |
|
Yes, I think it's just waiting on @burdorfmitchell 's tests. Prepping the other repos for when this is merged seems like a good idea. |
|
Sorry for the delay. I have tested the changes locally and on the github cli and find that I tested this locally on Brown's HPC cluster and also on the github CI (here) (ignore the failing external tests and other test failures are due to downloads failing). While this is comparing against a stored reference simulation output produced with an older version of lunarsky, I also ran the reference simulation with the latest lunarsky on main and got exact agreement with historical output. If a change in simulation output is expected, then I am fine updating the reference simulation on the Brown Digital Repository to match that. Besides that, everything except for one thing looks like it should be passing with your pyuvsim pull request (after it is rebased on top of main again). There may be a need to increment the lunarsky version in some ci files as well but that can be belated. On this line, I believe you open a file and never close it, which creates a warning which makes the warning test fail on pyuvsim. |
|
Hi @burdorfmitchell , thank you for running those tests, and spotting the unclosed file handle. I just double-checked that the transformations to and from lunar frames, and the sidereal time calculation, are consistent between |
It sounds like @burdorfmitchell is saying that if he runs the reference sims on main on pyuvsim they match the saved outputs, so I don't think we need to go back to compare with whenever the saved outputs come from, we just need to compare against main. I suspect that while |
|
@bhazelton @burdorfmitchell I think I've found the issue. This branch also updates all the transformations to use the TDB (barycentric dynamical time) instead of the TT (terrestrial time). This was a mistake before; the ephemeris time used by spice and by jplephem should be TDB, not terrestrial time, since the ephemeris kernels are tabulated in TDB. The difference between the two can be hundreds of milliseconds, during which time the moon travels about 20 meters in the barycentric frame. This would then affect any baseline transformations involving ICRS. One way to check if this is the problem is to temporarily change If that fixes it, then it means the new ref sim results are more correct and should supersede the original. |
|
That does change the output a bit but I still see similar disagreement. Temporarily changing back to when I run the reference simulation I get this: |
|
Hi @burdorfmitchell -- where are those deviations appearing? Do they vary in a noticeable way with frequency, baseline length or angle? |
|
@burdorfmitchell Could you send me the visibility files of both the reference sims and your rerun with this branch and tdb changed to tt? |
The dependency on
spiceypyhas been weighing this down a bit. The jplephem package is already required for handling ephemerides in astropy, but wasn't fully equipped to parse PCK kernels required for the lunar frames. With some AI help, we now have a PCK reader and have replaced all spiceypy dependencies. This also obviates all station_id tracking, since we don't need to make temporary ephemeris files for each lunar surface point in use.I'm going to continue verifying the changes, but tests are passing.