Closed whedon closed 3 years ago
Hello human, I'm @whedon, a robot that can help you with some common editorial tasks. @aquilesC, @caldarolamartin, @mwcraig it looks like you're currently assigned to review this paper :tada:.
: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.
:star: Important :star:
If you haven't already, you should seriously consider unsubscribing from GitHub notifications for this (https://github.com/openjournals/joss-reviews) repository. As a reviewer, you're probably currently watching this repository which means for GitHub's default behaviour you will receive notifications (emails) for all reviews 😿
To fix this do the following two things:
For a list of things I can do to help you, just type:
@whedon commands
For example, to regenerate the paper pdf after making changes in the paper's md or bib files, type:
@whedon generate pdf
Reference check summary (note 'MISSING' DOIs are suggestions that need verification):
OK DOIs
- 10.1086/599043 is OK
- 10.1117/12.2181397 is OK
- 10.1117/12.2233176 is OK
- 10.1201/b19711 is OK
- 10.1117/1.JATIS.4.4.048002 is OK
MISSING DOIs
- None
INVALID DOIs
- None
:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:
Hi. I cannot modify the check list and the link to accept is expired. @pibion could you please give me a hand to solve this? Thanks
Hi again. I've tried to tick the boxes with out success again. I have not accepted the review formally and the the link to do so (point 2 at the top) is not working. I believe this is the reason I cannot start with the review list check. @pibion, could you please take another look?
Hi, I also cannot check the boxes....
@caldarolamartin, @mwcraig are you signed in to github? You should only need to (1) subscribe to the issue and (2) be signed in to edit the checkboxes.
@arfon is that correct?
@whedon re-invite @caldarolamartin as reviewer
OK, the reviewer has been re-invited.
@caldarolamartin please accept the invite by clicking this link: https://github.com/openjournals/joss-reviews/invitations
Yes! now it works. Thanks!
@mwcraig - it looks like you need to accept the invite to the the repository here https://github.com/openjournals/joss-reviews/invitations before you can click the checkboxes.
@caldarolamartin - I've re-invited you to the repository - please accept the invite at https://github.com/openjournals/joss-reviews/invitations .
Thanks @arfon , shoulda checked the whedon docs :/
Hi! I've just posted an issue with my review comments.
Hi, I have replied to the comment.
@caldarolamartin just wanted to make sure you saw this update from @hemanthpruthvi .
@hemanthpruthvi, I think the idea of an environment file is a good one since the dependencies are somewhat sensitive. @caldarolamartin , I've always used conda environment files for this. Do you have any other recommendations?
Hi @pibion, I've just closed the issue I opened for my review comments. Regarding the dependencies, I've also only used conda environment files, but I know virtualenv can do the same job.
@pibion and @hemanthpruthvi , I am in the middle of the review. I strongly suggest, as @caldarolamartin points out, to create requirement files and a setup file. This will make life much easier for other users. Sorry for the self-promotion, I've written a guide on setup files here, and a very short introduction to virtual environments here that can be used as a starting point.
Even though conda environments are very handy, they are particularly well suited for isolating complete work environments. I am not completely convinced conda environment files are meant to be distributed to a wider audience unless there are stringent needs (and this is not the case for PyAstroPol that relies on widely available libraries). I believe that a conda environment.yml file may create conflicts (conda environments are not particularly flexible). I would favor a requirements.txt file that makes explicit required (minimum) versions.
I have reviewed the paper. I have noted a lot of comments that can be used by the author to improve the quality of the code and the paper but that do not impact directly the decision of whether the program is ready to be published. However, there is a (short) list of issues at the bottom of this message that must be addressed in order to make the work, in my opinion, ready to be published.
The paper stresses too much the limitations and too little the features. The first mentioned feature says:
However, a major caveat here is that, to computeMueller matrix the electric fields of all the rays will be added coherently after propagating through the system.
Even the features are handicapped in the description of the software instead of focusing on the strengths. Of course, this is a choice of the authors, but I do think that the impact can be related to how one decides to present the work.
Something that I have missed from the paper is how the program relates to other existing packages (if any). It can be that this is the first package addressing polarization, but the author also mentions comparing to Zeemax as the ground truth. I would replace several of the stated limitations to expand on a discussion about how this program fits in the community.
The writing can be improved. There are several sentences of the form
Majority of the optical surfaces in astronomical
Instead of
The majority of the optical surfaces in astronomical
Or
The package can be described as collection of the important objects
Instead of
The package can be described as a collection of the important objects
The readme file includes a list of modules that are used, such as os
, and copy
which are Python built-ins, while it also adds numpy
and matplotlib
which are external libraries and must be installed. It also mentions mpl_toolkits
which is part of matplotlib and therefore can't be installed separately.
Installation instructions must be improved. A novice user will not be able to go through them. This can be quickly solved by: adding a requirements.txt
file to the root of the project, and/or creating a setup.py
file specifying dependencies and versions. The latter also helps with the instruction of adding the folder to the PYTHONPATH
/
The documentation is provided as a sphinx project, but sphinx is not listed in the requirements, therefore it can't be built by a user. Even though the documentation is on-pair right now with the code, since it has no visible continuous integration tools to keep the documentation always up to date, I would suggest either leaving the _build
folder out of the repo and asking people to build the docs, or using tools such as ReadTheDocs
to simplify the process.
Note: The readme points towards a html file in the docs folder which, on Github, renders as the source code and not as a website. This makes it very hard to explore the documentation online and/or offline, especially when relying on sphinx-autodoc (the documentation is built from the source code of the program and therefore is not explicitly written in the docs folder).
The index page of the documentation has very little information on how to get started. It is customary to include some general information, similar to the readme file, and link to specific points for the reader to be able to crack into the program.
The code itself is very well documented. Every method and class I have checked had appropriate docstrings, so compliments to the author for taking the time to do such a thorough work. That really pays off for anybody trying to learn from the code and, potentially, contribute to it.
The program performs the tasks that it needs to perform. However, inspection of the code leaves several rooms of improvement that relate to standards (but not requirements) of how Python programmers work.
For example, using from PyAstroPol import *
is highly discourage, since this is prone to name clashes and makes it very hard to understand what is going to be available to the developer. This is done through the code everywhere, for example in the __init__
file every module is imported with import *
. And this propagates to the example on the Readme, where matplotlib is never imported but the code still works. This behavior is also visible within the program files. For example, material.py uses numpy, but numpy is never imported.
Another topic is the non-adherence to PEP8. Again, these are guidelines, but that can ensure the long-life of a project by lowering the barrier to future contributors. I believe all methods use lowerCamelCase, but attributes of classes don't follow a regular pattern. For example, in coating.py there is self.Wavelength
and self.iRI
.
The examples are a great starting place. I think they are the best addition to the code since they very quickly allow a new user to get the gist of the program and start adding small modifications to it.
However, all the examples run into a RuntimeWarning
because of a division by 0. This raises the concern of whether the code is actually performing the right calculation or if there are problems that may have an impact on the obtained values. I have no way of verifying the accuracy claims:
Results of the code have been verified against previous works (Pruthvi, Krishnappa, Belur, &Kadagattor (2018)), and ZEMAX© OpticStudio – a popular commercial software.
The code re-distributes material properties as csv files under an MIT license. Many of this materials are taken from PhysRevB which is not necessarily compatible with the chosen license. I am not 100% sure whether there is a license incompatibility or whether people is free to redistribute data without consent. Any advice from @pibion @caldarolamartin or @mwcraig ?
The paper and the code are ready to be published provided that the author performs the following:
RuntimeWarning
pointing towards a division by zero still generates the proper results. Ideally, this warning should be handled by the program so the end user does not need to worry about it. @aquilesC Thank you very much for the thorough review and the valuable comments, I am working on addressing them. Meanwhile, I want to quickly address the issue regarding the Material Licenses. If I understand correctly, there are two issues.
For issue 1 : Albeit the information listed in the Material files originated in various publications, the raw files themselves are directly downloaded from https://refractiveindex.info/. The sources of the data are also listed there. The website's database is public domain via CC0 1.0 license i.e., whatever data hosted there is free to be used/distributed without seeking any consent.
For issue 2 : If re-distributing under MIT license is an issue, I propose either of two ways for resolution, whichever is plausible.
@hemanthpruthvi I have seen the license of refractiveindex.info, but I am not sure whether the author is actually entitled to re-distribute the data under a CC0 license. It would, for example, eliminate the citation to the original work with the real measurements. The sources of the website are papers not published under open access and I haven't seen information on APS regarding the distribution of datasets. I know, for example, that Comsol distributes some material properties but more recent measurements can't always be built-into the program, therefore they point you in the direction of how to get the dataset. In any case, this is a out of my depth regarding my understanding of copyright. I think the polite (and perhaps correct) thing to do is to add, in the materials folder, the citation of where the indexes come from (not the website, but the original work) since this is the best way of having a reproducible workflow in the future. You could add a Readme file directly in that folder.
@aquilesC I understand and I agree. Accordingly, I have added a Readme file in the materials folder that refers to original sources.
@whedon generate pdf
:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:
@aquilesC Thank you again for the review. Please find the updated contents.
I have put a little more emphasis on the features and added some content as to how the code fits in the community. I have also re-written parts of the paper.
I believe that an explanation is needed regarding the writing choices. As I have mentioned in the updated paper, I do not know of an open-source software with the features of PyAstroPol
. My counterparts in the field and I have followed the approach that is mentioned in the paper: make instrument specific models, use commercial software, or a combination of both. Hence, my first instinct was to compare with the commercial software that we have already been using, and the emphasis on the limitations is probably a reflection of that process.
I have added requirements.txt
to the package. I have also elaborated on the installation instructions.
I have hosted the documentation at ReadTheDocs
and provided the link in the README
. I am grateful for your compliments regarding the code documentation. I am glad that you took notice of the efforts.
I have modified the examples to reflect the recommended usage of import
. Now, it is import PyAstroPol as pap
. I have some additional development plans which might require some restructuring. I will consider changes to the internal code at that time.
I have tried to adhere to lowerCamelCase for the most part, and all the methods follow that. Unfortunately, the attributes do deviate from this because I chose names/abbreviations which are popularly in use already. That is the case with the attributes such as self.rs
or self.Wavelength
. In case of self.iRI
, the alternative was self.iRefractiveIndex
which, I believe, would be needlessly longer.
I have now suppressed the runtime warning. The code uses array operations instead of conditional loops for the sake of performance. Hence, these warnings are inevitable, and I have taken special care to deal with such cases. It can be found in the form of occasional nan_to_num
operations, and so the output results are proper.
The example named 11_KTTCoelostat
is provided so that the user can verify the accuracy claims. It compares the outputs of PyAstroPol
and Zemax OpticStudio
. Unfortunately, this is possible only if the user has the software license, and an additional package PyZDDE (Python-Zemax interface)
.
@hemanthpruthvi , good work! I've just checked the manuscript, and it sounds much better with the positive aspects of your software stated first, and also the improvements to your code and examples are definitely a good addition.
I have marked all the checkboxes, @pibion , I think the work is ready to be published, I believe my review concludes, but please feel free to ping me if I can do anything else for you.
@aquilesC many thanks!
@caldarolamartin , @mwcraig, do you have an ETA on when you might be able to spend time on your reviews?
Hi @hemanthpruthvi! I have gone through the revised manuscript and code and I agree with Aquiles, it is improved and ready for publication.
I have marked all my checkboxes, @pibion, I also think paper is ready to be published.
@caldarolamartin thanks for looking through the revised submission!
@pibion -- I'll get more comments in tonight.
@hemanthpruthvi -- neat looking package and thanks for the improvements so far!
PYTHONPATH
as it is no longer a standard practice and may have unintended side effects.PyAstroPol
defining which things get import with *
you could ensure that when users import your package they get only your modules, not additional ones like numpy, etc. I'm happy to help you do this too if you are amenable to doing it.requirements
file is excellent! It looks like it has two .txt
extensions, though, so you should probably rename it to requirements.txt
..gitignore
then deleting the folders and commit those changes. The ones I have in mind are any .ipynb_checkpoints
and __pycache__
folders.The spirit of this is to help you make it as easy as possible for potential users to install and try out your package when the paper is published. The package itself is very interesting!
My only remaining concerns are the ones listed above. I'm happy to help get those fixed with some PRs if you want.
@mwcraig Thank you very much for the review and the offer to help.
I very much agree with you, and with @aquilesC and @caldarolamartin as well, regarding the installability. I absolutely intended/intend to have a setup.py
so that the users can install the package by simply using pip
, like all other packages. The reason it is not there at the moment is something to do with the user data.
The commercial software that is widely used for these purposes creates two directories when installed: root directory -- for the program files, and user directory -- for the files to be accessed by the user. In my package, ./Examples/
and ./Materials/
come under the user data, some of which will also be accessed by the program in the runtime.
I think the simpler solution is to just keep one directory, but then it is not desirable to have it somewhere in site-packages
. Hence, I have resorted to present installation scheme. I was hoping to get some user input and features in, so that I can decide if I should take the trouble to have two directories.
I very much welcome if you have any ideas in that regard.
I have modified the file __init__.py
. Now, other packages like numpy
will not be imported when PyAstroPol
is imported. accordingly.
Taken care.
Taken care.
@hemanthpruthvi , what you mention does not have a unique answer, it will depend a bit on what you expect the users to achieve. There are two things you can do. One is, during installation create a folder in the $HOME directory (or create it the first time the package runs) and put the examples and materials in that folder, so the user can easily modify them.
You can also use a variable (environmental or explicit, something like: os.environ['pyastropol_folder']
) to point to the directory where the materials are stored.
You can also opt for installing your package in development mode (pip install -e
or python setup.py develop
which will add to the PATH without the need to ask the user to explicitly mess with the Pythonpath, and you'll get the extra advantage of working inside virtual environments out of the box.
Although I think any of the suggestions above can be good additions from a user perspective, I don't think they are part of the review process itself.
@hemanthpruthvi -- thanks for the explanation about #1, that makes much more sense. One suggestion (though I'm finishing out my review indicating this is ready to go) is to add a note to your README asking users to provide feedback on this.
@aquilesC Thank you very much for all your suggestions! I will be considering them when revising the installation scheme.
@mwcraig I have appended README with a request to the users about the feedback regarding the installation scheme.
@mwcraig have @hemanthpruthvi's changes to the README satisfied the installation requirement, in your view?
@whedon generate pdf
:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:
@mwcraig have @hemanthpruthvi's changes to the README satisfied the installation requirement, in your view?
Yes, given the special installation situation here.
Hi @hemanthpruthvi it looks like we're nearly ready to publish. I'm reading over the paper and have a few comments. I haven't finished reading the paper yet but wanted to get these to you quickly, I'm expecting to finish a bit later today!
@hemanthpruthvi here are the rest of my comments on the paper.
@whedon generate pdf
:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:
@whedon generate pdf
:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:
@pibion Thank you very much for your feedback. I have incorporated some of your suggestions for the text in the updated manuscript.
Replaced 'polarization calibration' with 'polarimetric calibration', which I think is more appropriate. Polarimetric calibration routines use calibration data and modelling to correct the effects on the state of polarization caused by the telescope and the instrument.
Edited the text 'The one simple' to 'The simple end'. Mueller matrix computation is its only end goal i.e., only the features required to compute the Mueller matrix are developed. Since complete polarized ray propagation is required for that, a lot of other functions are also available as byproducts.
Replaced 'considering' with 'depending on'. There are various levels of complexities in the astronomical systems. For some simpler systems, instrumental polarization was derived analytically. For newer complex systems, significantly complex modelling including numerical methods is being used. The choice/approach as to how much modelling is to be used to compute the instrumental polarization is selected considering the complexity of the system.
Replaced 'facilitated' with 'included'.
Appended the text 'of the beam path' to 'at any instance'. I meant to say spot diagram at any instance of the beam path, including but not limited to before and after each elements. I have modified the text accordingly.
Replaced 'devised' with 'modelled'.
@whedon generate pdf
:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:
@hemanthpruthvi okay, thanks for these updates! I have only one question remaining:
I'm still not sure what you mean when you say "It can be easily distributed along with the polarimetric calibration routines." Do you mean, "It can be easily distributed along with the polarimetric calibration routines for a particular telescope?"
Submitting author: @hemanthpruthvi (Hemanth Pruthvi) Repository: https://github.com/hemanthpruthvi/PyAstroPol Version: v0.1.0 Editor: @pibion Reviewer: @aquilesC, @caldarolamartin, @mwcraig Archive: 10.5281/zenodo.4285762
: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
@aquilesC & @caldarolamartin & @mwcraig, 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 start on your review when you are able, and be sure to complete your review in the next six weeks, at the very latest ✨
Review checklist for @aquilesC
Conflict of interest
Code of Conduct
General checks
Functionality
Documentation
Software paper
Review checklist for @caldarolamartin
Conflict of interest
Code of Conduct
General checks
Functionality
Documentation
Software paper
Review checklist for @mwcraig
Conflict of interest
Code of Conduct
General checks
Functionality
Documentation
Software paper