2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

XSPECで「Cannot find any APEC files corresponding to 3.0.9」が出たときの対処法

2
Last updated at Posted at 2026-05-11

はじめに

XSPEC 12.15.1 で apec モデルを使おうとしたところ、以下のエラーが出ました。

Cannot find any APEC files corresponding to 3.0.9

今回は、HEASoft を 6.33.2 から 6.36 に更新した際に発生しました。
この記事では、実際のログをもとに、原因と対処法を簡単に整理します。

公式 FAQ にも関連する説明があります。

発生したエラー

xspec を起動して apec モデルを読み込もうとすると、以下のようなエラーが出ました。

% xspec

		XSPEC version: 12.15.1

XSPEC12>model apec

Input parameter value, delta, min, bot, top, and max values for ...
              1       0.01(      0.01)      0.008      0.008         64         64
1:apec:kT>
              1     -0.001(      0.01)          0          0          5          5
2:apec:Abundanc>
              0      -0.01(      0.01)     -0.999     -0.999         10         10
3:apec:Redshift>
              1       0.01(      0.01)          0          0      1e+20      1e+24
4:apec:norm>
Cannot find any APEC files corresponding to 3.0.9

continuing to use those from 

***calcMultiTempPlasma : failure in calcCIESpectrum, status = 1

========================================================================
Model apec<1> Source No.: 1   Active/Off
Model Model Component  Parameter  Unit     Value
 par  comp
   1    1   apec       kT         keV      1.00000      +/-  0.0          
   2    1   apec       Abundanc            1.00000      frozen
   3    1   apec       Redshift            0.0          frozen
   4    1   apec       norm                1.00000      +/-  0.0          
________________________________________________________________________

XSPEC12>

特に重要なのは以下の部分です。

Cannot find any APEC files corresponding to 3.0.9

XSPEC が APEC version 3.0.9 のファイルを探しに行っているものの、対応するファイルが見つかっていないようでした。

解決方法

~/.xspec/Xspec.init を確認すると、以下のように古い AtomDB version が指定されていました。

ATOMDB_VERSION:  3.0.9
NEI_VERSION: 3.0.4

これを以下のように変更しました。

ATOMDB_VERSION: latest
NEI_VERSION: latest
SPEX_VERSION: latest

編集後、再度 xspec を起動して apec を読み込むと、正常に動作しました。

修正後のログ

修正後は、以下のように APEC data が読み込まれました。

% xspec

		XSPEC version: 12.15.1

XSPEC12>model apec

Input parameter value, delta, min, bot, top, and max values for ...
              1       0.01(      0.01)      0.008      0.008         64         64
1:apec:kT>
              1     -0.001(      0.01)          0          0          5          5
2:apec:Abundanc>
              0      -0.01(      0.01)     -0.999     -0.999         10         10
3:apec:Redshift>
              1       0.01(      0.01)          0          0      1e+20      1e+24
4:apec:norm>
Reading APEC data from 3.1.3


========================================================================
Model apec<1> Source No.: 1   Active/Off
Model Model Component  Parameter  Unit     Value
 par  comp
   1    1   apec       kT         keV      1.00000      +/-  0.0          
   2    1   apec       Abundanc            1.00000      frozen
   3    1   apec       Redshift            0.0          frozen
   4    1   apec       norm                1.00000      +/-  0.0          
________________________________________________________________________

XSPEC12>

Reading APEC data from 3.1.3 と表示されており、インストールされている APEC data が使われていることを確認できました。

補足

なぜこの修正で直ったのか

実際にインストールされている modelData は、heasoft-6.36/spectral/modelData から確認できます。私の環境では以下のようなファイルがありました。

apec_v3.1.3_coco.fits
apec_v3.1.3_line.fits
apec_v3.1.3_nei_comp.fits
apec_v3.1.3_nei_line.fits
latest.txt

一方で、

apec_v3.0.9_...

に対応するファイルは見当たりませんでした。

つまり、Xspec.init では 3.0.9 を指定しているものの、実際の modelData には対応するファイルがなかったため、今回のエラーにつながっていたのだと思われます。

また、latest.txt の中身を確認すると、以下のようになっていました。

ATOMDB_VERSION: 3.1.3
SPEX_VERSION: 3.08
NEI_VERSION: 3.1.3

そのため、latest を指定することで、少なくとも私の環境では利用可能な新しい version が参照されるようになったと考えています。

Xspec.init は自動更新されない

少し混乱した点として、Xspec.init は HEASoft を更新しても自動では更新されないようです。
そのため、HEASoft を更新したあとに APEC や NEI 周りでエラーが出た場合は、まず~/.xspec/Xspec.init内の以下を確認すると良さそうです。

ATOMDB_VERSION
NEI_VERSION
SPEX_VERSION

おわりに

HEASoft 更新後に apecnei 周りでエラーが出た場合は、

  • ~/.xspec/Xspec.init
  • heasoft-XXXX/spectral/modelData

などを確認すると、原因を追いやすいかもしれません。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?