Skip to content

Conversation

@loitly
Copy link
Contributor

@loitly loitly commented Aug 19, 2016

DM-7271: table enhancements

  • do not apply default data format
  • introduce optional display format
  • add "AUTO" and "NONE" as format keywords.
  • for fits table, set display format to "%.9g" for double type.
  • add support for TDISPn fits table header
  • remove condition so temp files will not get written into source directory

When reading fits table, set display format to "%.9g" for double if TDISPn is not given.

 - do not apply default data format
 - introduce optional display format
 - add "AUTO" and "NONE" as format keywords.
 - for fits table, set display format to "%.9g" for double type.
 - add support for TDISPn fits table header
 - remove condition so temp files will not get written into source directory
@loitly loitly force-pushed the DM-7271_table_disp_format branch from a971cc5 to f707022 Compare August 22, 2016 23:14
dt.getFormatInfo().setWidth(Arrays.stream(new int[]{
dt.getKeyName().length(),
dt.getDataUnit().length(),
dt.getTypeDesc().length()}).max().getAsInt());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can data unit or type desc be null?

@tgoldina
Copy link
Contributor

Review complete. Looks good.

As we talked, it would be nice to save display format in decimated data too. Currently, when catalog is loaded from a FITS table, XYPlot points have higher precision than table data, which can result in a gap between the displayed point and the highlight when the resolution is high or there is only one point.

Later we might want to carry server-side precision to the client and use display format only to format.

@tgoldina
Copy link
Contributor

Review complete. Works as expected for the 3 table types I've tested: IRAS catalog, FITS binary, uploaded IPAC table without type info.

@loitly loitly merged commit 7ff0633 into dev Aug 24, 2016
@loitly loitly deleted the DM-7271_table_disp_format branch August 24, 2016 18:50
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

Successfully merging this pull request may close these issues.

3 participants