Skip to content
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

Feature tracker #37

Open
4 of 18 tasks
kbarbary opened this issue May 21, 2015 · 3 comments
Open
4 of 18 tasks

Feature tracker #37

kbarbary opened this issue May 21, 2015 · 3 comments

Comments

@kbarbary
Copy link
Member

kbarbary commented May 21, 2015

This is an issue to track some obvious features that should be added. My guess is that they will be added gradually over time as needed, but in a backwards-compatible manner.

General

Headers

  • Read a single keyword value without the comment, like read_key(hdu, key)[1].

Images

  • Write to a subset of the image: write(hdu, data; start=(100, 200))
  • Read to already-allocated array: read!(hdu, data), read!(hdu, 1:20, 1:30, data)
  • Read/write tile-compressed images.

Tables

  • Read and write variable length table columns [Read/write variable-length table columns #36]
  • Method to get column names in table (DataFrames extends Base.names but that has a different definition; maybe use colnames) [Method to get column names in a FITS table #93]
  • Method to get number of rows in table (extend Base.length)
  • Relax write method to write(::FITS, ::Dict{Any, Vector}) (raise runtime error if any dictionary key is not ASCII)
  • Read ranges of table rows: read(hdu, "COLNAME", 1:10)
  • Read arbitrary table rows: read(hdu, "COLNAME", [1, 3, 6, 10])
  • Read to already-allocated arrays: read!(hdu, "COLNAME", data)
  • Append rows to a table
  • Insert columns into a table
  • Read/write bit columns (into BitArrays?)
  • Iterate over table rows?
  • Read multiple columns simultaneously (requires low-level tinkering, byteswapping)
@jishnub
Copy link
Contributor

jishnub commented Sep 13, 2019

read! has been implemented now that #122 is merged

@mileslucas
Copy link
Member

Possible feature (I'm not sure if functionality exists in cfitsio)
write!(hdu, data)
write!(fits, i, data)
to overwrite the data in a given HDU. Currently the only option is to append a new HDU.

@jishnub
Copy link
Contributor

jishnub commented Jan 29, 2021

Currently we check the strides of the array to determine if the memory layout is contiguous. This is too conservative, but I don't know of a workaround right now other than using a Union of compatible types. For example, this means that currently writing out something like a Transpose is not supported even if the memory layout of its parent is contiguous and cfitsio supports this.

Keeping julia#10889 in mind, we may eventually use a trait-based check for contiguity instead of a strides-based approach as in the case now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants