Repository navigation
Conversation
|
👋 Thank you for your draft pull request! Do you know that you can use |
|
Uh oh! I forgot PyYAML is not a run-time dependency... how can an ECSV file be read? Might have to re-think this implementation. Sigh. JSON files, I guess ? @taldcroft, any suggestions how to avoid JSON and keep ECSV? |
|
@nstarman - unfortunately I can't think of a way to use ECSV for this case. It really does require YAML, so the choice is either don't use ECSV or make YAML a requirement for BTW, if you are wondering about why we used YAML not JSON for ECSV.. I often think about this myself:
I spent a little time thinking about ways of reading key bits of the YAML header "by hand" without YAML, but at the end I don't think this will be worth it. Sigh. |
|
BTW, 👍 on the idea, even if it ends up not working out! |
Thanks!
Well, I don't want to add any requirements... So I guess I'll use JSON for astropy's internal storage 😢 . For user-defined cosmologies, I think the ECSV is more logical and the code I have here will work well. Perhaps I'll just transition this PR into one for user-defined cosmologies. Thanks @taldcroft for the quick reply. |
|
Hello @nstarman 👋! It looks like you've made some changes in your pull request, so I've checked the code again for style.
Comment last updated at 2021-04-28 20:07:24 UTC |
What about FITS? 😆 |
|
I'm also planning on Linear A as soon as it's deciphered. |
8109cf2 to
44f38d0
Compare
|
@nstarman At some point I'd like to have a discussion to better wrap my head around your cosmology plans. I like where this is headed though and I think you have the right idea. +1 to using YAML to describe cosomologies, and if we need to add pyyaml as a dependency for astropy I would not be opposed. |
|
@embray Adding PyYAML would be awesome. @taldcroft and I had some discussion in a different PR about this... and it would be very nice to have a clear way of serializing quantities. |
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
0ea5ac5 to
f197006
Compare
|
Worth doing, but this was way outdated and the wrong approach. |
Description
Allow the user to add an ECSV file of custom realizations to a config directory (default in
~/.astropy/cosmologies/) and have them be created at import. Also, I think using the ECSV format will eventually enable cool things like working through an MCMC chain of cosmologies.For backward compatibility, the file is read and dicts of each row added into
parameters.py.Part of #10673
Blocked by
#11530#11570#11542#11559@embray, this PR relates to our convo on non-entrypoint custom realizations.
OLD Description