-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement saving regions to ECSV via astropy Table #551
Comments
I voiced concern with the implementation in Jdaviz only because I worry that Jdaviz is creating a new format with no buy-in from My proposal is to have partial implementation here, throw |
It might make sense to try and implement or at least scope out support for all regions from the start, to make sure the proposed format will actually work with all region types (in particular polygons) |
If we're going to create a new regions file format, I wonder if |
Chiming in to say the opposite of @larrybradley. 🥲 |
I don't think we're proposing a new regions file format? It should be possible, and even straightforward, to directly write all data/metadata associated with regions in a tabular format. I think it will be inefficient to use .ecsv, since it will likely be necessary to write out a lot of redundant information (.reg and .crtf formats allow unspecified information to be filled in implicitly), but it shouldn't be too hard to implement a reasonable ecsv reader. That said, if we're using astropy tables, it shouldn't matter what format we're writing to if we're using astropy's unified table writing/reading scheme; it can write to FITS, ecsv, or whatever. Probably |
What if we thought about this as a new mixin column type which would be a column of regions in a table? (So then format is secondary as @keflavich says) |
A new mixin column type is an interesting idea. I'm not sure how much work that would require. FYI, I just remembered that @perrygreenfield proposed for astropy funding that included support for ASDF serialization of |
As @keflavich pointed out above, metadata is already supported by other formats, so what value is ECSV adding to the mix? |
I recently implemented IO to/from ECSV files via
astropy.table
inspecutils
, and coded up a quick minimal implementation to save out the spatial regions relevant to Jdaviz in spacetelescope/jdaviz#2874 to provide export parity with spectral regions. I spoke to @larrybradley offline about upstreaming that code to here, and he pointed out that it would need to handle all the metadata available inregions
, the other regions that we don't use in JDaviz, and implement a reader/parser as well. This issue is mostly to register my intent to do that at some point, and to provide a public place for any further discussion.The text was updated successfully, but these errors were encountered: