Closed zonca closed 4 years ago
@zonca My first guess would be that this is just a result of the random generation of part of the spectral model using a different seed. We would need to check exactly how check_d7_353_64.fits
was produced. Was this in the original pysm2 testing directory? (I can't remember if we'd implemented it at that point)
I created check_d7_353_64.fits And used the same seed, is it possible the seed has different assumptions?
See the notebook above here about how I created that test file
Okay, doesn't seem to be that, the code setting the seed and doing the random generating is identical in the two versions. I'll take a deeper look now.
The original pysm2 random generation was always done at nside 256, however the faulty implementation is doing the random generation on templates ud_graded to the model's nside. I've got the right results by adding an nside keyword to the model's read_map function. This might not be desirable, so can figure out a way to hard code the reading at 256 if that is preferred.
@bthorne93 can you also rebase on master, so the unit tests run
@zonca Since it's a destructive operation, and I'm not comfortable enough with my git skills, would you mind doing that? I've added the docstring above.
@bthorne93 sure, no problem
@bthorne93 rebase was too messy, I merged!
tests pass on my machine!
Great! Should I merge?
no, I'll make sure everything passes on travis then merge
Not sure why github is not showing the travis builds feedback anymore. Anyway, all tests pass:
https://travis-ci.org/github/healpy/pysm/builds/670830673
excellent, thanks @bthorne93 !
@bthorne93 I'm finally back working on this, I have implemented unit tests, they don't pass!
d7
model definition in 1ed5db3052e2da621f6432f20f6d21348567630fuK_RJ
and they have a disagreement up to 10%, see https://gist.github.com/zonca/a1e35bce9d467519e94666524daf0df2#file-hd17_pysm2-pysm3-ipynbPySM 3 does the calculation on float32 to save memory, but I don't think that is enough to explain the difference, what do you think?