icecube / FIRESONG

FIRst Extragalactic Simulation Of Neutrino and Gamma-ray
Other
18 stars 8 forks source link

sample code in README file creates "hidden" output files #62

Closed JostMigenda closed 3 years ago

JostMigenda commented 3 years ago

[As part of the JOSS review.]

When using this sample code from the README file

from firesong.Firesong import firesong_simulation
firesong_simulation('.', density=1e-6, Evolution='CC2015SNR', zmax=4.0,
                    fluxnorm=1.44e-8, index=2.28, LF='SC')

Firesong will generate a file called .Firesong.out (note the period at the start of the file name!), which is hidden by default in most GUI-based file managers. This is potentially very confusing to users.

Instead of simply changing the initial argument in this example (as well as the second example in the README), I would recommend improving the FIRESONG code itself to handle these file paths better (perhaps by using os.path.join() instead of string concatenation). That’s because '.' is such a common shorthand that people would likely use it even if it wasn’t given in an example.

ChrisCFTung commented 3 years ago

Changed the example in README, and the way to handle filename in the newest commit