ystk
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- lang:ja-jp GA:UA-110325944-2 ###### tags: `open` --- # X線スペクトル解析 [TOC] ## はじめに X線というのは紫外線より強く(波長が短く)、ガンマ線より弱い(波長が長い)あたりの電磁波を指す。具体的には波長でいえば$10$nm--$0.01$nm、周波数なら$10^{16}$--$10^{19}$Hz、$e=h\nu$からphotonのエネルギーに変換すると$0.1$--$100$keVが相当する。X線研究においてはエネルギー(keV)を単位として用いることが多い。 :::info $1$keV=$1$nm=$10^7$K=$2.42\times 10^{17}$Hz (黒体輻射を仮定したときの温度) この対応関係は覚えておくと役に立つ。 ::: X線波長は大気の吸収のために地上観測が不可能であり、観測データはX線衛星によるもののみとなる。 そのためデータ解析は各衛星ごとに解析で利用するソフトやパイプラインまで準備されており、可視光の分光観測と比較すると**非常に解析が楽である。** とはいえネットや英語のmanualから情報をあつめてつなぎ合わせるのはそれなりに大儀である。せめて筆者が経験した苦労を他の人が背負わなくて済むように、情報をここにまとめていく。 ### X線データの解析の流れ 簡単に記すと次のようになる。 1. インターネット上で公開されているアーカイブから観測データを取得する 2. 各衛星ごとに与えられたソフトやパイプラインで観測データを処理してスペクトルデータを得る。 3. Xspecでそのスペクトルデータを開き、モデルフィッティングを行う。 :::info X線観測は衛星からしか行えないのだが、主要なX線衛星の観測データは一定期間後にアーカイブとして公開される。そのため地上観測と違い、PIではなくとも(つまりproposalを書かなくとも)今まで蓄積されてきたアーカイブからデータを取得することで充分な研究を行うことができる。 ::: ### OS 筆者のPCのOSはWSL (Ubuntu)だが、Linux (Ubuntu)でも同様と考えてもらって構わない。Macや他のdistributionのLinuxの場合も大きくは変わらないと思う~~多分きっと~~。(aptをyumに変更するなど) また、terminalはbashを想定している。 解析ソフトだけでなく観測データもダウンロードすることになるため、PCのストレージ消費は少なくとも数十GB、観測データの量によっては100GB以上にもなることは覚悟しておいてほしい。 ## Xspecの導入 XspecはX線解析の最後に必ず必要になるソフトである。どういうデータ、衛星の解析を行う場合でもX線に携わるなら導入しておいて間違いはないだろう。 - ++[Xspecの導入](/5sw6ekv1RwSyckjbL61iwg)++ ## 各衛星の解析の準備 各衛星ごとのCALDBや解析用のソフトのインストール、設定ファイルの記述を行う。これは直近で必要な衛星についてのみ行えばよい。 - ++[各衛星の解析の準備](/2Q3bs6LQTlmidRxUzomJ6Q)++ ## ds9のインストール また、ds9というソフトも必須であるのでインストールする。これはプロットや領域指定など解析において幅広く利用されているソフトである。 ++[ds9のホームページ](http://ds9.si.edu/site/Download.html)++ からOSにあわせてダウンロードし、適当な場所で解凍する。その後、pathの通った場所(`/usr/bin/`など)にシンボリックリンクを貼ればどこからでも`ds9`で起動する。 ```bash # XXXXは実際のds9の実行ファイルのpathに書き換える sudo ln -s XXXX/ds9 /usr/bin/ds9 ``` :::info root権限の不要な場所に自分用の`bin`を作成し(`~/mylib/bin`など)、そこにPATHを通しつつ、ds9のシンボリックリンクを置いてもよい。 ```bash # ~/.bash_profile export PATH=$PATH:${HOME}/mylib/bin ``` ::: :::warning 筆者がダウンロードしたときは別の方法だった気がする。(詳細は忘れた) ::: ## 観測データの入手 有名な衛星の観測データは基本的にheasarcから入手できる。衛星の観測データが欲しければまずはheasarcにアクセスする。 - ++[heasarcから観測データの入手](/e4o8yu1MQGmi4TNz9NQlQw)++ ただしHST(Hubble Space Telescope)やGALEXなどMAST管轄の一部の衛星のデータは別ページからの入手が必要になる。こちらはかなりGUIよりの設計で、イカしてる感じがする。あと、やや重い。 - ++[MASTから観測データの入手](/I_32ZmC9TAKrzixBYLK9fQ)++ :::danger このページでは観測データのディレクトリ構成として次のようなものを推奨し、前提としている。 work (観測データまとめ) - NGC1313_X1 (天体名) - data (観測データ) - nustar (衛星名) - 30XXXXXX (1つの観測データ) - newton - 06XXXXXX ::: ## 観測データの衛星ごとの処理 こちらについても直近で必要な衛星についてのみ行えばよい。 - ++[NuSTARの解析](/xBLkgusPSPyrRF1t1O4rEQ)++ - ++[XMM-Newtonの解析](/zxhD2O6mT5So5fb-efuFNw)++ - ++[Suzakuの解析](/Trtj-oWpSXiKCoL1G0dokg)++ - ++[Swiftの解析](/I3a4IwYETYCpU_kwcu6YPg)++ 一読した人のためにScriptのみのページも作成した。(Scriptのみのページの方が情報が新しいことがある) - ++[衛星ごとの処理(まとめ)](https://hackmd.io/@ystl/rkOK0QvPS)++ これはオマケなのだが、自分用にX線観測衛星のスペックをまとめたページを作成した。 - ++[X線観測衛星のスペック](/HvYvSrQLQoqaRGDCMXz1dw)++ ## Xspecでモデルフィット 観測データを適切に処理してスペクトルデータが得られたら、Xspecでそれを読み込んで解析を行う。 - ++[Xspecでモデルフィット](/O-YSqCbxQdy_tHwTeQEQAg)++ **ここまでできれば、X線スペクトル解析入門は完了といってよい。** ## PyXspec 昔ながらのXspecもよいが、PythonにおけるPyXspecを用いればとても便利になる。bashとPythonを比較すれば、その汎用性は明らかだろう。 - ++[PyXspecの導入](/ITmOwtYQTNamdl7aGuf-lg)++ - ++[PyXspecの使い方とアレンジ](/A8dN16XRTd--JFw7KHkFGg)++ - ++[PyXspecでmatplotlibを利用する](/-6BI1ZRwRM2QVN4B1p6u0Q)++ ## オマケ - ++[ULXのスペクトルフィッティングについて](/ITOVU8mWQlO3F7MyCh2o7w)++ - ++[X線スペクトル解析 : オマケ](/oOjjd0QxTNqTpP9-xh4_VQ)++ <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-110325944-2"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-110325944-2'); </script>

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully