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

#19 converter #24

Merged
merged 11 commits into from
Nov 24, 2021
Merged

#19 converter #24

merged 11 commits into from
Nov 24, 2021

Conversation

r-yamada1998
Copy link
Member

No description provided.

Copy link

@KaoruNishikawa KaoruNishikawa left a comment

Choose a reason for hiding this comment

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

Quick suggestions:

@KaoruNishikawa KaoruNishikawa linked an issue Nov 9, 2021 that may be closed by this pull request
@KaoruNishikawa KaoruNishikawa added this to the v0.2.0 milestone Nov 9, 2021
@KaoruNishikawa KaoruNishikawa added the feature New feature or request label Nov 9, 2021
KaoruNishikawa
KaoruNishikawa previously approved these changes Nov 9, 2021
@KaoruNishikawa
Copy link

KaoruNishikawa commented Nov 10, 2021

SpectralCube automatically modifies FITS header like below; are these behaviour OK for this project?
Please let me know what implementation will be employed as the differences affect the test script's implementation.

  • The hdu property of SpectralCube modifies the FITS header comments like below

    header=cube.hdu.header.tostring(),

    >>> cube.hdu.header
    SIMPLE  =                    T / conforms to FITS standard
    ...
    >>> cube.header
    SIMPLE  =                    T /Standard FITS  # same as original hdu
    ...

    If this change isn't acceptable, please use cube.header.

  • The string expression of unit can be modified

    >>> hdu.header["BUNIT"]  # original
    'Jy/beam'
    >>> cube.header["BUNIT"]
    'beam-1 Jy'
    >>> cube.hdu.header["BUNIT"]
    'beam-1 Jy'

    I couldn't find the way to keep the expression.

@KaoruNishikawa KaoruNishikawa dismissed their stale review November 10, 2021 03:51

Dismissing, since new implementation problems are found.

@astropenguin
Copy link
Member

astropenguin commented Nov 10, 2021

@r-yamada1998
Copy link
Member Author

cube.headerを用いた場合は、headerの中身によってはheaderを書き換えたものを返すように思われます。特に、cunit3のvalueがない場合などは、自動的にheaderにcunit3のvalueを追加する仕様です。いずれの方法を選んでもオリジナルから変更が行われるという点では大差ないように思われますが、どのようにいたしましょうか?

Copy link
Member

@astropenguin astropenguin left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! It looks good to me.

@r-yamada1998 r-yamada1998 merged commit 23db9b1 into main Nov 24, 2021
@r-yamada1998 r-yamada1998 deleted the #19_converter branch November 24, 2021 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write detailed code in converter.py
3 participants