dials.spotfinder を使ってみる

覚え書き:

$ dials.spotfinder test-000[123].osc
Configuring spot finder from input parameters
Finding strong spots

Finding spots in image 0 to 3...
Extracted strong pixels from images........................................1.45s
Merged 3 pixel lists with 38751 pixels.....................................0.00s
Extracted 6818 spots.......................................................0.03s
Calculated 6818 spot centroids.............................................0.03s
Calculated 6818 spot intensities...........................................0.00s
Filtered 983 spots by number of pixels.....................................0.00s
Filtered 876 spots by peak-centroid distance...............................0.00s
Saved 876 reflections to strong.pickle.....................................0.01s

こんな感じで使う。画像を1枚しか指定しないと、dials/algorithms/peak_finding/spot_finder.py の sweep.get_array_range() あたりで

'ImageSet' object has no attribute 'get_array_range'

という訳のわからないエラーが出る。

これは、画像が複数か1枚かで、内部で使われるクラスが切り替わるため。(とはいえ、例外出して死ぬのは不親切だと思う)

出力は、strong.pickle というファイルである。pickle は、Python でオブジェクトをシリアライズするための形式。ヘルプでは .pkl という拡張子になっているので紛らわしい。

$ dials.print_reflection_stats strong.pickle |head
   -0.37     0.00     0.06   -0.73     0.00     0.11   582.0
    0.34     0.00     0.14    0.68     0.00     0.28   299.0
   -0.17     0.00     0.17   -0.33     0.00     0.34   295.0
   -0.26     0.00     0.12   -0.53     0.00     0.24   387.0
...

として dials.print_reflection_stats で確認できる。

#各カラムの意味