Closed whedon closed 4 years ago
@sambit-giri
Here are some purely atheistic suggestions as I go through the tutorial.
@sambit-giri
Here are some more detailed comments/questions as I go through the tutorial.
t2c.power_spectrum.dimensionless_ps(dT_subtracted, kbins=15, box_dims=box_dims)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/nabarry/opt/anaconda3/lib/python3.7/site-packages/tools21cm/power_spectrum.py", line 464, in dimensionless_ps
ks_new = np.array([ks[factor*(i+0.5)] for i in range(kbins)])
File "/Users/nabarry/opt/anaconda3/lib/python3.7/site-packages/tools21cm/power_spectrum.py", line 464, in <listcomp>
ks_new = np.array([ks[factor*(i+0.5)] for i in range(kbins)])
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
Dear @nicholebarry
- subtract_mean_channelwise is in t2c.read_files. Is there a more logic place for this function?
I discovered that subtract_mean_signal and subtract_mean_channelwise are doing the same thing. Therefore I have removed subtract_mean_channelwise. I think subtract_mean_signal is at the place.
- There's a couple of places where the auto-generated descriptions on the readthedocs are hard to parse because there should be a newline and/or period. Some examples are in Other Modules under "Some useful attributes" and on the Main modules page under t2c.power_spectrum.power_spectrum_mu.
Thanks for pointing it out. I have fixed them.
- In Temperature, please add units
Done.
- In Tutorials under 21cm Brightness Temperature, please add units to the tutorial plot
Done.
- In Tutorials, please set x and y axis labels for all plots where applicable
Done.
@nicholebarry
@sambit-giri
Here are some more detailed comments/questions as I go through the tutorial.
- In Tutorials under 21cm Brightness Temperature, it seems as though the sample data set already has its per-freq mean subtracted, and thus the subtract_mean_channelwise has very little effect. This may be confusing to some.
I don't think so. The tutorial now prints the mean of the first channel before and after applying subtract_mean_signal.
- In Tutorials under 21cm power spectrum, should the box_dims be the C2Ray box size (244) or the array size (250)? Looking at the code, it seems as though it should be 244, but this is confusing from a new-user tutorial standpoint. Add a comment?
I have commented on this in the tutorial.
- I tried to expand upon the tutorial a little bit in 21cm power spectrum, and I got the following error.
t2c.power_spectrum.dimensionless_ps(dT_subtracted, kbins=15, box_dims=box_dims) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/nabarry/opt/anaconda3/lib/python3.7/site-packages/tools21cm/power_spectrum.py", line 464, in dimensionless_ps ks_new = np.array([ks[factor*(i+0.5)] for i in range(kbins)]) File "/Users/nabarry/opt/anaconda3/lib/python3.7/site-packages/tools21cm/power_spectrum.py", line 464, in <listcomp> ks_new = np.array([ks[factor*(i+0.5)] for i in range(kbins)]) IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
Thanks! I have fixed this error.
Dear @sambit-giri could you please put in the documentation explicitly something about running the Automated tests? I know there is a redmine in the directory, but how a user can know that directory exist? Cheers Aurelio
@sambit-giri
Thanks for implementing those comments.
Final comments on the tutorial:
Misc. comments from browsing the modules:
I look forward to using tools21cm in conjunction with 21cmfast in the future!
@sambit-giri
Thanks for implementing those comments.
Final comments on the tutorial:
- Units for R and V in plots under bubble size distributions. Also titles to distinguish the plots using the various methods.
- I don't want to delay the publication, so this is more of a suggestion for the future. There's a lot of fantastic modules for observational aspects (foregrounds, noise, beam kernels, etc) that you've implemented. I'd love to see a tutorial to highlight this functionality. I also think this would advertise to a wider potential user-base.
Misc. comments from browsing the modules:
- t2c.telescope_functions.kelvin_2_jansky says it return muJy, but I think it may return Jy. Is this correct?
I look forward to using tools21cm in conjunction with 21cmfast in the future!
Thanks @nicholebarry for the recommendations. The current plan is to publish the base version of tools21cm. Few modules for observational aspects, like the foreground models and the beam kernels, are still under development. Therefore we have not mentioned about it in the paper. As the thermal noise goes well under the hood of observational aspects, we decided to release them together in the next release version.
@nicholebarry
@sambit-giri
Thanks for implementing those comments.
Final comments on the tutorial:
- Units for R and V in plots under bubble size distributions. Also titles to distinguish the plots using the various methods.
Done.
Misc. comments from browsing the modules:
- t2c.telescope_functions.kelvin_2_jansky says it return muJy, but I think it may return Jy. Is this correct?
It is Jy. I have fixed it in the docstring.
@sambit-giri
Thanks @nicholebarry for the recommendations. The current plan is to publish the base version of tools21cm. Few modules for observational aspects, like the foreground models and the beam kernels, are still under development. Therefore we have not mentioned about it in the paper. As the thermal noise goes well under the hood of observational aspects, we decided to release them together in the next release version.
Makes total sense.
I would suggest some more description/motivation on the front page of readthedocs (and subsequently the Github main readme) that would help a first-time user know whether or not this package satisfies their needs. Feel free to use these suggestions (or better ones you come up with). Just a few sentences for each would do. For reference, I'm using pyuvdata as a guide.
I also ran into a few failures with unit testing (which look to be related to the dimensionless_ps bug seen above)
============================================================ FAILURES =============================================================
____________________________________________________ test_bubbles_from_kmeans _____________________________________________________
def test_bubbles_from_kmeans():
> out = t2c.bubbles_from_kmeans(data_ball, n_clusters=2, upper_lim=False)
test_IdentifyRegions.py:19:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../opt/anaconda3/lib/python3.7/site-packages/tools21cm/identify_regions.py:63: in bubbles_from_kmeans
if n_clusters==2: array, t_th = threshold_kmeans(data, upper_lim=upper_lim, n_jobs=n_jobs)
../../../opt/anaconda3/lib/python3.7/site-packages/tools21cm/identify_regions.py:104: in threshold_kmeans
else: t_th = X[y==1].max()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
a = array([], shape=(0, 1), dtype=uint8), axis = None, out = None, keepdims = False, initial = <no value>, where = True
def _amax(a, axis=None, out=None, keepdims=False,
initial=_NoValue, where=True):
> return umr_maximum(a, axis, None, out, keepdims, initial, where)
E ValueError: zero-size array to reduction operation maximum which has no identity
../../../opt/anaconda3/lib/python3.7/site-packages/numpy/core/_methods.py:30: ValueError
______________________________________________________ test_dimensionless_ps ______________________________________________________
def test_dimensionless_ps():
'''
With this test, power_spectrum_nd and radial_average are also test.
'''
> dd, kk = t2c.dimensionless_ps(gauss, kbins=kbins, box_dims=box_dims)
test_PowerSpectrum.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../opt/anaconda3/lib/python3.7/site-packages/tools21cm/power_spectrum.py:464: in dimensionless_ps
ks_new = np.array([ks[factor*(i+0.5)] for i in range(kbins)])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.0 = <range_iterator object at 0x11bc5dba0>
> ks_new = np.array([ks[factor*(i+0.5)] for i in range(kbins)])
E IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
../../../opt/anaconda3/lib/python3.7/site-packages/tools21cm/power_spectrum.py:464: IndexError
@nicholebarry
I also ran into a few failures with unit testing (which look to be related to the dimensionless_ps bug seen above)
============================================================ FAILURES ============================================================= ____________________________________________________ test_bubbles_from_kmeans _____________________________________________________ def test_bubbles_from_kmeans(): > out = t2c.bubbles_from_kmeans(data_ball, n_clusters=2, upper_lim=False) test_IdentifyRegions.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../../opt/anaconda3/lib/python3.7/site-packages/tools21cm/identify_regions.py:63: in bubbles_from_kmeans if n_clusters==2: array, t_th = threshold_kmeans(data, upper_lim=upper_lim, n_jobs=n_jobs) ../../../opt/anaconda3/lib/python3.7/site-packages/tools21cm/identify_regions.py:104: in threshold_kmeans else: t_th = X[y==1].max() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a = array([], shape=(0, 1), dtype=uint8), axis = None, out = None, keepdims = False, initial = <no value>, where = True def _amax(a, axis=None, out=None, keepdims=False, initial=_NoValue, where=True): > return umr_maximum(a, axis, None, out, keepdims, initial, where) E ValueError: zero-size array to reduction operation maximum which has no identity ../../../opt/anaconda3/lib/python3.7/site-packages/numpy/core/_methods.py:30: ValueError ______________________________________________________ test_dimensionless_ps ______________________________________________________ def test_dimensionless_ps(): ''' With this test, power_spectrum_nd and radial_average are also test. ''' > dd, kk = t2c.dimensionless_ps(gauss, kbins=kbins, box_dims=box_dims) test_PowerSpectrum.py:38: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../../opt/anaconda3/lib/python3.7/site-packages/tools21cm/power_spectrum.py:464: in dimensionless_ps ks_new = np.array([ks[factor*(i+0.5)] for i in range(kbins)]) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = <range_iterator object at 0x11bc5dba0> > ks_new = np.array([ks[factor*(i+0.5)] for i in range(kbins)]) E IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices ../../../opt/anaconda3/lib/python3.7/site-packages/tools21cm/power_spectrum.py:464: IndexError
Did you git pull and install the package again? I had completely rewritten the dimensionless_ps function after your previous comment about it. It doesn't have the above lines anymore (https://tools21cm.readthedocs.io/_modules/t2c/power_spectrum.html#dimensionless_ps). I have fixed the other error you got with your unit test.
Dear @nicholebarry
@sambit-giri
Thanks @nicholebarry for the recommendations. The current plan is to publish the base version of tools21cm. Few modules for observational aspects, like the foreground models and the beam kernels, are still under development. Therefore we have not mentioned about it in the paper. As the thermal noise goes well under the hood of observational aspects, we decided to release them together in the next release version.
Makes total sense.
I would suggest some more description/motivation on the front page of readthedocs (and subsequently the Github main readme) that would help a first-time user know whether or not this package satisfies their needs. Feel free to use these suggestions (or better ones you come up with). Just a few sentences for each would do. For reference, I'm using pyuvdata as a guide.
- Inputs: the simulation codes that you can currently input into tools21cm
- Outputs: bubble sizes, power spectrum, redshift distortions, etc
- Under-development: instrumental effects, noise, other specific simulation code inputs
- Citation: point to JOSS paper when published and a snippet about how people should cite the code.
- Tests: description on how to run the unit tests (also great for people to know if they've installed correctly).
We have updated the documentation as per your recommendations. We will put the "Citation" after a DOI is produced.
Best, Sambit
@sambit-giri,
Yes, sorry, you're right. I didn't reinstall. Everything passed now. And I think that's a great level of detail with the documentation.
I'll officially accept. My review is done (@pibion need anything else from me?). Best of luck in the future!
@nicholebarry
Thanks!
Dear @sambit-giri I saw you put the info about the automated test. Im also done with with review. Congratulations! @pibion
@nicholebarry @aureliocarnero thanks so much for your great work on this! There's nothing else you need to do for the publication process.
@ziotom78, thanks for getting started with your review! Do you expect to be able to work on this in the next few weeks? If not, I can set a reminder with whedon to ping you.
Dear @sambit-giri I saw you put the info about the automated test. Im also done with with review. Congratulations! @pibion
Thanks @aureliocarnero!
Hi @sambit-giri , I have almost finished my review. Everything looks ok, apart from one issue with the automatic tests. I have opened an issue (see above), once this is fixed my review is complete.
Ok, issue #7 is closed, my review is complete. Thank you all!
Thanks @ziotom78 !
Dear @pibion
Is there anything else to be done? What is the next step in the process?
Best, Sambit
@sambit-giri we have just a few more steps - I need to do a read-through of the final pdf and then you'll need to archive your software on Zenodo or Figshare. I'll be able to review the pdf tomorrow and will ping you on the action you need to take tomorrow.
@whedon generate pdf
@whedon check references
Reference check summary:
OK DOIs
- 10.1016/j.physrep.2006.08.002 is OK
- 10.1088/0034-4885/75/8/086901 is OK
- 10.1111/j.1365-2966.2012.21293.x is OK
- 10.1093/mnras/stx2539 is OK
- 10.1093/mnras/stt1341 is OK
- 10.1093/mnras/stv2679 is OK
- 10.1093/mnras/stx649 is OK
- 10.1093/mnras/stz1220 is OK
- 10.1093/mnras/stz2224 is OK
- 10.1088/1475-7516/2019/02/058 is OK
- 10.1093/mnras/sty1786 is OK
- 10.1093/mnras/stv571 is OK
- 10.1007/s10686-013-9334-5 is OK
- 10.1051/0004-6361/201220873 is OK
- 10.1017/pasa.2018.37 is OK
- 10.1017/pasa.2012.007 is OK
- 10.1109/JPROC.2009.2017564 is OK
MISSING DOIs
- None
INVALID DOIs
- None
@sambit-giri the pdf looks great. I have one requested change: the last sentence in the second paragraph isn't immediately clear.
I would recommend splitting this sentence into two to make it clearer that Tools21cm takes the simulation outputs as its inputs. Maybe something like, " Much of the functionality of Tools21cm is focused on the construction and analysis of mock 21 cm observations in the context of current and upcoming radio telescopes, such as the Low Frequency Array (LOFAR; Haarlem et al., 2013), the Murchison Widefield Array (MWA; Tingay et al., 2013; Wayth et al., 2018), Hydrogen Epoch of Reionization Array (HERA; DeBoer et al., 2017) and the Square Kilometre Array (SKA; Mellema et al., 2013). Tools21cm takes the simulation data of these telescopes as its inputs."
@whedon generate pdf
@pibion Thanks for the recommendation. I have changed the sentence to the following:
"Much of the functionality of Tools21cm is focused on the construction and analysis of mock 21 cm observations in the context of current and upcoming radio telescopes, such as the Low Frequency Array (LOFAR; Haarlem et al., 2013), the Murchison Widefield Array (MWA; Tingay et al., 2013; Wayth et al., 2018), Hydrogen Epoch of Reionization Array (HERA; DeBoer et al., 2017) and the Square Kilometre Array (SKA; Mellema et al., 2013). Tools21cm post-processes cosmological simulation data to create mock 21 cm observations."
@whedon check references
Reference check summary:
OK DOIs
- 10.1016/j.physrep.2006.08.002 is OK
- 10.1088/0034-4885/75/8/086901 is OK
- 10.1111/j.1365-2966.2012.21293.x is OK
- 10.1093/mnras/stx2539 is OK
- 10.1093/mnras/stt1341 is OK
- 10.1093/mnras/stv2679 is OK
- 10.1093/mnras/stx649 is OK
- 10.1093/mnras/stz1220 is OK
- 10.1093/mnras/stz2224 is OK
- 10.1088/1475-7516/2019/02/058 is OK
- 10.1093/mnras/sty1786 is OK
- 10.1093/mnras/stv571 is OK
- 10.1007/s10686-013-9334-5 is OK
- 10.1051/0004-6361/201220873 is OK
- 10.1017/pasa.2018.37 is OK
- 10.1017/pasa.2012.007 is OK
- 10.1109/JPROC.2009.2017564 is OK
MISSING DOIs
- None
INVALID DOIs
- None
@sambit-giri this looks excellent, thank you!
I'll need you to make a tagged release and archive, and report the version number and archive DOI in this review thread.
Zenodo, Figshare, and OSF are good options. I like to use Zenodo because you can set it up to automatically create a new DOI every time you add a new tag to your repository.
@pibion I have put it up on Zenodo. The link is https://zenodo.org/badge/latestdoi/88035801
@sambit-giri could you add Hannes Jensen to the author list on your Zenodo archive?
@sambit-giri could you add Hannes Jensen to the author list on your Zenodo archive?
@pibion Done!
@sambit-giri thanks! I'll start the final part of the process now!
@whedon set 10.5281/zenodo.3973542 as archive
OK. 10.5281/zenodo.3973542 is the archive.
@whedon set v2.1 as version
OK. v2.1 is the version.
@whedon accept
Attempting dry run of processing paper acceptance...
Reference check summary:
OK DOIs
- 10.1016/j.physrep.2006.08.002 is OK
- 10.1088/0034-4885/75/8/086901 is OK
- 10.1111/j.1365-2966.2012.21293.x is OK
- 10.1093/mnras/stx2539 is OK
- 10.1093/mnras/stt1341 is OK
- 10.1093/mnras/stv2679 is OK
- 10.1093/mnras/stx649 is OK
- 10.1093/mnras/stz1220 is OK
- 10.1093/mnras/stz2224 is OK
- 10.1088/1475-7516/2019/02/058 is OK
- 10.1093/mnras/sty1786 is OK
- 10.1093/mnras/stv571 is OK
- 10.1007/s10686-013-9334-5 is OK
- 10.1051/0004-6361/201220873 is OK
- 10.1017/pasa.2018.37 is OK
- 10.1017/pasa.2012.007 is OK
- 10.1109/JPROC.2009.2017564 is OK
MISSING DOIs
- None
INVALID DOIs
- None
:wave: @openjournals/joss-eics, this paper is ready to be accepted and published.
Check final proof :point_right: https://github.com/openjournals/joss-papers/pull/1632
If the paper PDF and Crossref deposit XML look good in https://github.com/openjournals/joss-papers/pull/1632, then you can now move forward with accepting the submission by compiling again with the flag deposit=true
e.g.
@whedon accept deposit=true
👋 @aureliocarnero - I notice you did not check off the performance box as part of your review. Is there a problem with this item?
@sambit-giri - when "21 cm" is used as an adjective, as in "21 cm signal", it should be hyphenated to "21-cm signal". Can you change this in your paper and in the title? You might also want to change the title of the zenodo archive to match. Actually, I now see that you need to change the title of the Zenodo archive in any event, as it's the default title from the repo.
@whedon generate pdf
Dear @danielskatz
I have edited "21 cm" in the paper wherever needed. I have also changed the title of the zenodo archive.
Best, Sambit
Submitting author: @sambit-giri (Sambit Kumar Giri) Repository: https://github.com/sambit-giri/tools21cm Version: v2.1 Editor: @pibion Reviewers: @nicholebarry, @aureliocarnero, @ziotom78 Archive: 10.5281/zenodo.3973542
:warning: JOSS reduced service mode :warning:
Due to the challenges of the COVID-19 pandemic, JOSS is currently operating in a "reduced service mode". You can read more about what that means in our blog post.
Status
Status badge code:
Reviewers and authors:
Please avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) by leaving comments in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)
Reviewer instructions & questions
@nicholebarry & @aureliocarnero & @ziotom78 , please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:
The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let @pibion know.
✨ Please try and complete your review in the next six weeks ✨
Review checklist for @nicholebarry
Conflict of interest
Code of Conduct
General checks
Functionality
Documentation
Software paper
Review checklist for @ziotom78
Conflict of interest
Code of Conduct
General checks
Functionality
Documentation
Software paper
Review checklist for @aureliocarnero
Conflict of interest
Code of Conduct
General checks
Functionality
Documentation
Software paper