先進的中性子三軸分光器
HODACA
HOrizontally Defocusing Analyzer Concurrent data Acquisition spectrometer at C11 port
概要
HODACA(HOrizontally Defocusing Analyzer Concurrent data Acquisition)は、C11ビーム孔に設置された、先進的中性子三軸分光器です。24本の検出器と132枚のPGアナライザ結晶を装備することで、水平面内の中性子散乱データを効率的に収集することが可能です。物性研究所益田研究室の菊地帆高氏が中心となって、設計・建設がすすめられました。分光器の詳細は、プレプリント(JPSJ特集号へ投稿)もしくは、菊地氏の博士論文の第一部「次世代三軸分光器HODACA」をご覧ください。
C11では当面HODACAと既存三軸分光器HERを併用しますが、分光器の切り替えに1日間を要します。HODACA使用希望の方は、益田までご連絡ください。
Specification
Measurement efficiency: Approximately 24 times higher than that of the conventional triple-axis spectrometer HER.
Ef: 3.635 meV (fixed)
Ei:2.1 meV < Ei < 11 meV
Scattering angle: Covering a scattering angle of 48 degrees by installing 24 detectors at 2-degree intervals. By operating the A2 motor, scattering angles of up to approximately 120 degrees (depending on the incident energy) can be covered. (Refer to the PDF below.)
energy resolution:0.1 - 0.2 meV
Beam size : 40 mm × 40 mm (maximum)
Measurable Q range: Please refer to the PDF file below for details.
The energy dependence of the incident neutron flux at C1-1
Sample environment
Caution
We recommend using Cu plates in cryofurnaces, as high temperatures can cause Al plates to bend.
software' logo
Software "ASYURA.exe"
Advanced SYstem for User's data Reduction and Analysis
Developper : Hodaka Kikuchi @ ISSP, the Univ. of Tokyo
Development environment : PyInstaller: 6.0.0, Python: 3.11.5, Platform: Windows-10-10.0.22621-SP0
Please contact the email address below for any requests or bug reports.
Please include "asyura" in the subject line.
hodaka.kikuchi%issp.u-tokyo.ac.jp
%→at
Manual of Software "ASYURA.exe"
Advanced SYstem for User's data Reduction and Analysis
The left is the Japanese manual, the right is the English manual.
Please contact the email address below for any requests or bug reports.
Please include "asyura" in the subject line.
hodaka.kikuchi%issp.u-tokyo.ac.jp
%→at
Japanese
English
Latest Software "ASYURA.exe" (Mac)
Mac version (2024/05/12)
I have suspended the release due to the discovery of several bugs.
Mac version (2024/02/01)
I have released the ASYURA version for Mac. Please note that the Windows version is updated more frequently, so the Mac version may be slightly older.
Latest Software "ASYURA.exe" (windows)
windows version (2024/07/13) version 3.3.7
I have updated the UI so that the sizes of the list box and input box change according to the resizing of the exe.
The 're-bin' algorithm has been modified to significantly improve processing speed when not using smoothing.
The auto-bin performance for 'hw cell' has been enhanced.
It is now compatible with smoothing even when selecting detector-detector with background subtraction.
※ If you downloaded this version between July 13th and July 16th, please download it again. The exe file at the link was incomplete.
windows version (2024/06/25) version 3.3.6
Smoothing in the hw direction is now possible when the "hw cell" option is selected.
Some label names have been changed.
change UI
windows version (2024/06/20) version 3.3.5
The performance of the file merge function has been improved. Previously, files with the same scan command were added together, but now files with different scan commands can be merged together. (For example, c2 scan and a2 scan)
windows version (2024/06/18) version 3.3.4
Improved performance of the auto function.
By entering 0 in the "±" field in 2D view and 3D view, processing will be performed using only the position closest to the center.
The UI has been changed to make it easier to use.
A problem with setting the powder hw bin has been fixed.
windows version (2024/06/12) version 3.3.3
Fixed a bug where the Intenisty of vanadium fit was not displayed correctly.
Some of the labels have been changed.
windows version (2024/06/11) version 3.3.2
The labels are now automatically updated to match the U and V labels entered by the user.
The order in which parameters are saved has been changed from the previous version.
windows version (2024/06/1) version 3.3.1
Processing speed has been improved.
windows version (2024/05/28) version 3.3.0
You can now set the initial values in the 3D view.
windows version (2024/05/25) version 3.2.0
I have brushed up the code throughout. This speeds up the process considerably.
The format of save data has been changed. This now includes all information about the slice or cut direction and integration range.
If you change the BG coefficient, you can now process it simply by pressing mesh division. S(q,ω) and χ(q,ω) can also be selected. However, if you change the subtraction method, this will not work, so please start over from the load file.
The background file can now be saved.
windows version (2024/05/23) version 3.1.1
I have started version control.
Users can now set cell creation for the hw direction. When setting the hw cell, the hw tolerance value is ignored. Outputs the average energy of the data in the set hw bin. If there is no data, the average value of max and min of the cell will be output.
I have fixed a bug related to χ(q,ω).
Calculation feasure have been updated.
The logo has been updated.
※ Regarding the setting of bins for hw, U, and V, currently, the definition is based on the ends of the cell rather than the center. In other words, if a measurement is taken at hw=0, please set it as min=-0.05, max=0.05, bin 0.1. This can be changed upon request.
windows version (2024/05/19)
I have added the option to choose between using the nearest detector or averaging with A2 and C2 tolerance for the subtraction method's detector.
Additionally, for the subtraction method's pixel, I have included an option where if the foreground or background data contains NaN values, the subtracted data will also have NaN values.
windows version (2024/05/17)
I have fixed the bug with powder.
Changed the UI.
Restored the graph scale.
windows version (2024/05/11)
The bug concerning the background function "detector by detector" not selecting the correct dataset has been identified and resolved.
※ In previous versions, this bug occurred when measurements were conducted with multiple values of a2 for the same energy. However, the correct data is displayed when only one value of a2 is measured.
I've fixed the bug that occurs when there are interrupted files in the pixel-pixel background subtraction feature.
windows version (2024/05/07)
I fixed the bug where the background subtraction was not being scaled by a constant factor.
I have resolved the bug related to the graph scale.
windows version (2024/05/05)
Added background subtraction method. Please refer to the manual for details.
Changed the UI.
Enabled changing the scale by directly inputting the maximum and minimum values of the graph.
windows version (2024/04/22)
I've resolved the issue with error bars.
I've fixed the issue with selecting background data.
I've changed the unit of input for the smoothing feature from % to rlu.
Additionally, I've implemented the advance mode, which allows for 2D slices and 1D cuts in arbitrary axis directions.
windows version (2024/04/04)
I have resolved the issue with TAS mode.
The aspect ratio of graphs in constant energy cuts has been modified.
Additionally, I have added the functionality to display grids in color plots.
windows version (2024/04/03)
I have made it so that when selecting a file, it adds to the previously selected files. If the same file is selected again, all but one instance will be excluded.
The aspect ratio for constant E cut graphs has been modified to be normalized by Q.
I have also changed the label of the slider for adjusting the maximum intensity value.
windows version (2024/03/01)
I have resolved the issue where processing was not done when there was only one data point in the dat file.
windows version (2024/02/05)
I corrected an error in the calculation method for the intensity type, and adjusted it to the correct calculation method.
I also modified the calculation to allow for the mutual computation of λ and E in the calculation module. However, it should be noted that the calculation of 2θ, Q, and d is still based on E.
I added the capability to differentiate between hours and minutes in the time estimation for scanning.
The help function has been enhanced.
windows version (2024/01/30)
I have implemented a smoothing function. Please input numerical values for δU, δV, and δQ. You can set it as a percentage of the bin size. Increasing the bin size by δU, δV, δQ(%) means widening the bins and summing the values. In other words, setting it to 100% will also add the intensity of the neighboring bins.
※While this function is powerful in improving the clarity of the figure, be cautious as it may result in double-counting data within the range specified by δU, δV, δQ(%). Please pay sufficient attention to this aspect.
I have changed the output format for data storage.
I have implemented the ability to estimate the time for scan simulations.
For single crystal scan simulations, we have introduced sliders in the constant energy map to allow you to visualize the scan range.
I made some changes to the user interface (UI).
windows version (2024/01/16)
Significant update implemented.
The UI has undergone considerable changes. It has been redesigned to enable almost all functions to be performed on a single screen.
Background subtraction has been modified to automatically occur when background data is selected.
Displayed data can now be processed in three types: 1) cross-section, 2) S(q,w), and 3) X(q,w). For cross-section and S(q,w), users can subtract a background specified by a user-defined constant factor. In the case of X(q,w), separate temperatures can be set for background and foreground.
Users can define axis titles.
windows version (2024/01/16)
The scan simulation now allows outputting slice graphs with energy on the vertical axis and U or V on the horizontal axis.
I have implemented background subtraction. The system automatically determines whether the background measurements were specific to a certain C2, as in the case of TOF, or measured across all C2, as in the case of TAS, and subtracts accordingly.
※While the details will be documented in the manual at a later date, I'll provide a brief explanation here. Firstly, data within the tolerance range of the energy transfer are selected. Therefore, please note that the energy transfer should not exceed the measurement interval for proper subtraction. Then, the system selects the data closest to A2, followed by selecting the data closest to C2, and subtracts it as the background. This process is performed during file loading, streamlining the task of placing data into the three-dimensional mesh in a single step.
previous windows version (2024/01/13)
I have resolved the issue with calibration.
I have made some changes to the method of outputting figures.
※The overlay of graphs for 1D cuts is now updated to reflect the latest 1D cut graph. When performing certain operations in this program, the overlay of 1D cuts may appear on 3D and 2D cut figures. This behavior is not a bug but a designed feature. In such cases, please recreate the 1D cut graph and overlay it again as needed.
previous windows version (2024/01/10)
Fixed minor issues.
previous windows version (2023/12/21)
The masking feature for the detector has been implemented.
A functionality has been added to display the calculation results of Q in the calculation.
windows version (2023/11/24)
I have resolved the bug where the graph was not displayed on a logarithmic scale by default.
When closing the window, all created graphs will be closed simultaneously.
windows version (2023/11/13)
The UI has been slightly changed.
The energy shift is corrected using the vanadium file.
Added logarithm to graph display method.
windows version (2023/11/07)
Enabled user to set energy transfer tolerance.
Improved so that users can set the axis range of the displayed graph.
Enabled to select other than Detector12 in TASmode.
The design has been changed.
windows version (2023/11/02)
The files with different scan formats can now be loaded. (For example, combinations like c2 scan and energy scan, etc.)
The "recommendation" function now automatically inputs the bin size as well.
windows version (2023/10/31)
Happy Halloween!
I have resolved the bug where axis labels were duplicated when changing the Y-scale in the 1D cut figure.
TAS mode functionality was changed. Now, even if mcu is not defined, the app will display data for the scan.
The specification that figure numbers are fixed in TAS mode has been changed.
windows version (2023/10/19)
The powder sample analysis program has been improved.
The overall design has been slightly changed.
windows version (2023/10/18)
The behavior of the slider in 3D view has been stabilized.
The behavior of the slider in 2D view has been stabilized.
The behavior of the 1D cut overwrite button has been stabilized.
windows version (2023/10/17)
Users can determine the maximum intensity of the colormap themselves.
The "3D view" slider now corresponds to "up", "down", "left", and "right" on the PC.
The colorbar scale is now always displayed.
Users can determine the maximum value of the y-axis for 1D cuts.
Fixed a bug regarding reccomendation button functionality in powder mode.
windows version (2023/10/13)
It is now possible to overwrite graphs of one-dimensional cuts.
windows version (2023/10/12)
Changed the process for calculating error bars when reading multiple files.
windows version (2023/10/09)
Adjusted the button placement for single crystal one-dimensional cuts.
The 12th detector is now displayed in red in the simulation.
By inputting 0 to inc of a2 or c2 in simulation, calculation can be done with one a2 or c2.
windows version (2023/10/08)
Added the ability to merge SPICE output files.
Added a function to automatically omit the last data output when measurement is interrupted.
Fixed an issue where a graph window with nothing plotted would appear.
Console screen is turned off .
windows version (2023/10/07)
Changed the basic UI.
Added exception handling to make it less prone to bugs.
Added a button that shows the optimal range for the box.
HODACA manual
HERとの切り替え時、HODACAを再起動時に参考にすること 。
Developer Comment
初めに
昔に国立美術館で見た阿修羅像が印象的だったため、このアプリケーションの名前を阿修羅にしました。
ロゴの"y"は、HODACA分光器の散乱中性子の飛行経路から来ています。阿修羅は本当は"asura"というスペルらしいですが、HODACA分光器の要素を取り入れたかったため、"y"を追加しました。
PSIのCAMEAで共同実験する機会があり、CAMEAのデータ解析プログラムである"MJOLNIRGui"に刺激され、このアプリケーションを製作しました。
製作当初は重大なバグや不便な点が多かったですが、HODACAのユーザーから非常に多くの助言や要望を受け、改良してきて今に至ります。はじめの方のユーザーさんには申し訳ない気持ちと感謝の気持ちでいっぱいです。
リリース時には3000行以内のコードでしたが、最新のコードは7000行のコードになりました。コードを書くのもバグを解消するのも大変ですが、使いやすい&わかりやすいUIにするのはもっと大変だと感じています。(2024/01/20)
8000行を超えました。いまだに実装できていないプログラムが多くあります。(2024/03/01)
12864行でございます。ここまで付き合ってくれたBNLのIgor先生に感謝いたします。機能を増やしすぎてスペースがなくなってきたのでもし新しい機能を付与する場合はもう少し大きいGUIにすると思います。(2024/05/23)
効率重視のコードに切り替えました。11835行まで減りました。for文の中のif文を排除しました。そこまで処理速度は変わらないように思えます。もしかしたらプログレスバーの処理が重いのかもしれません。(2024/06/01)
近況報告
あるユーザーの試料について低エネルギーでのバックグラウンドがかなり高かったので、初めてバックグラウンド差し引き機能を使ってもらいました。かなり強力に機能していて驚きました。(2024/01/30)
相当なアップデートを行いました。ずいぶん前からやりたかったことをやっと実装できました。マニュアルも作り直さないといけません。もうUIの変更はしたくないですね。この辺PyQtだともう少しやりやすいんでしょうけど。(2024/01/18)
BNLのIgor博士にdictionaryを使用した方が良いと助言をいただいていました。その時はあまり有用性を感じていなかったのですが認識が甘かったです。バックグラウンドの差し引きの際にdictionary形式にした方が圧倒的にプログラミングが楽でわかりやすいです。いまからすべてを書き換えるのは難しいですが、おいおい変更していこうと思っています。(2024/01/17)
matlabで久々にプログラミングを行っていたのですが、for文でエラーが出まくりました。(i=1から始まるとか、()と[]の違いなど。)(2024/01/16)
割と重要な機能を付け加えたのでマニュアルを新しくする必要がありますが、疲れたので後日行います。(2024/01/16)
土日をバックグラウンドの差し引きのプログラムに費やしました。なんの成果も得られませんでした。月曜日になぜエラーを吐き出していたのが理解し火曜日の午前3時に完成しました。(2024/01/16)
LINUX用とMAC用のソフトをリリースする予定です。とりあえず、一通りの要望が終わってからコンパイルしようと思っています。LINUXの環境整備は浅見さんに行ってもらいました。MAC用のexe化はwei君に行ってもらいました。お二方、ありがとうございます。(2023/12/18)
LabViewが苦手です。誰か教えてください。(2023/12/18)
同研究室のwei君にバックグラウンドの差し引き機能を使用してもらいました。ダイレクトビームの影響もきちんと差し引きできていました。ただ、elasticの差し引きはあまりうまく機能していないようです。これについてはおいおい考えていきます。(2024/02/18)
今までdatファイルに1行しかデータが無かった場合、データを読み込まないという仕様があったのですが、昨日原因がようやくわかり解決しました。(2024/03/02)
ユーザーに分かりやすくバージョンもしくは日付表記をした方が良いと思いました。個人的にはver表記の方が好きなのですが、日付表記の方がわかりやすいですかね。(2024/03/02)
->ver表記になりました。
ユーザーからのリクエストに応えるのは大変です。例えばグラフの軸タイトルを変更するというコードだけでも60行近いコードを書いています。またグラフスケールの設定でも条件分岐の追加に非常に時間がかかっています。
グラフスケールをfigure内に埋め込むことに成功しました。実はより使い勝手の良いcanvasを使ったものを製作したのですが、グラフの重ね書きができないため断念しました。(2024/04/25)
github始めました。正直使いづらいんですが。(2024/05/04)
あの肝心な時ほどバックアップ取っていない現象に名付けしたいのですが、何がいいですかね?
ところでSPICEの状況がわかるようにslackのボットを作成したのですが、非常に良いです(自画自賛)。(2024/05/04)
->ユーザーとのコミュニケーション用にもSlackを使用しています。
ついでにPCの画面の一部のSSを取り、文字起こししてCSVファイルへ保存するソフトも作成しました。文字認識の精度はまぁまぁです。(2024/05/04)
->一番使用したかったdilution用のPCが古すぎてできませんでした。
background差分機能にpixel同士の差し引き方法を追加しました。ある程度の範囲でbackground測定をしたときに用いる用で、TOF的なbackground測定には対応できないです。将来的にチェックボックスで"☑TOF like"のようにすると思います。(2024/05/05)
->Igorさんにそれ必要か?と聞かれ作成をやめました。
グラフスケールが更新されない不具合がありました。1日かけてようやく原因が分かったのですが。"update(None)"というコマンドが入っていないだけでした。(2024/05/07)
改訂中のコードでファイルの読み込み順で表示されるグラフが異なるというバグが発生しました。ものすごく焦ったのですが、なんとソートするコマンドを誤って消していたことが原因でした。githubで前のversionのコードが無かったら終わっていました。(2024/5/23)
私のGUIを見た友人から、ドイツ車のエンジンルームみたいだなというコメントを頂きました。納得です。(2024/5/23)
version管理を始めました。私が初めて作成したのがver.1.0.0.だとすると、calibrationファイル及びbackground subtraction機能を追加したのがver.2.0.0.になります。そして今回リリースしたのは以前のファイルと互換性があるので正確にはver2.0.0.ですが、これまでのマイナーチェンジの回数とか覚えていないので心機一転でver.3.1.1.としました。(2024/5/23)
要望に対するコメント
エネルギートランスファーのトレランスを設定できるようにしてほしいという要望がありました。
-> 実装しました。繰り返し測定ではA1モーターのトレランスのせいで値がずれることがありましたが、これからは指定範囲内のエネルギートランスファーは平均化されて表示されるようになっています。
検出器のマスク機能を付けてほしいという要望がありました。
-> 意外に簡単に実装できました。(2023/12/21)
グラフの軸タイトルをUとVという表記ではなく(H,0,0)のようにしてほしいという要望がありました。
-> お待たせしました。ようやく実装できました。(2024/01/18)
グラフ軸の単位をÅ^-1と(r.l.u.)で切り替えられるようしてほしいという要望がありました。
-> 条件分岐のコードを書くのに時間がかかっています。スライダーをつけている3Dプロットや2Dプロットでは気を付けないとバグを誘発します。
スキャンシミュレーションについて縦軸がエネルギートランスファーのグラフを出力してほしいという要望がありました。
-> 新しいボタンや入力欄の配置が大変でしたが完成しました。(2024/01/16)
スキャンシミュレーションについてa*とb*を表示してほしいという要望がありました。
-> 意外に難しいですね。どうして矢印が明後日の方向を向くのでしょうか?
バックグラウンドの差し引きができるようにしてほしいという要望がありました。
-> だいぶ前からこの要望を頂いていました。どうしても自動化する方法が思いつかなかったのですが、ようやく完成しました。これにより、UIがかなり変わりました。(2024/01/16)
->detector by detectorの機能について平均化するoptionも作成しました。Igorさんのsuggestionです。
Q方向に対するスムージング機能が欲しいとの要望がありました。
-> 開発者はスムージングについては否定派だったので作成していなかったのですが、リクエスト数が増えてきたので実装します。しばらくお待ちください。(2024/01/22)
-> 実装しました。(2024/01/30)
constant E mapのアスペクト比を変更しました。(2024/04/04)
カラーマップについてグリッド線のon-off機能を追加しました。(2024/04/04)
backgroundの差し引き方法にpixel-pixelを追加してほしいという要望がありました。(2024/04/18)
-> 実装しました。ただしTOF-likeなバックグラウンド測定には対応していません。TOF-likeなbackground測定は"detector -detector"にしか対応していませんが、十分な機能だと思います。pixel - pixelではbackgroundのデータにforegroundとは別のsmoothingを実行できます。
グラフスケールを復活させてほしいと要望を頂きました。(2024/5/12)
->復活させました。XYZではなく各パラメータに準拠しているため、前よりもっと使いやすくなっていると思います。(2024/5/12)
バックグラウンドの差し引きでdetector-detectorの場合、A2とC2のトレランスを設定し、平均値を差し引けるようにしてほしいという要望が来ました。(2024/05/12)
->いや、正直相当難しかったです。コードは短かったですが、処理方法を思いつくまでに時間がかかりました。(2024/05/19)
hw方向のbinを設定したいと要望が来ました。(2024/05/19)
-> 実装しました。hwが一定のscanを実施した場合には非常に有用だと思います。もちろん、過去の自動的にhwを決定してくれる機能も残しています(こちらがデフォルトです)。もしhwが一定でないscanを実施した場合にはこちらの方がやりやすいと思います。あと、binの設定の定義ですが、cellの中心位置ではなくcellの両端です。ユーザーからわかりづらいと言われた場合は変更しようと思います。(2024/05/23)
UV表記が非常に混乱するという意見を頂きました。せっかくHKLのラベル入力欄があるので、2d viewや1d viewに反映させてほしいとのことでした。
->個人的にUとVにラベルを打ち込んだ場合、これに対応してdata constructionやcreate figureの項目についても変更してほしいと思っていました。やっと実装できました。これがあるのとないので認識のしやすさが段違いなのでできて良かったです。メニューバーの項目も自動でラベルを変更できるようにしたのですが、これが大変でした。入力した文字を読み取って上から何番目のメニューバーを削除して、もう一度作り直すということをしています。(2024/06/12)
通常ASYURAでは測定したエネルギーを自動で読み取っていい具合にしてくれるのですが、より精度を上げました。24本のアナライザではEfが少しばらつくため、これがなかなか大変でした。私はエネルギーステップをエネルギートランスファーによって変えるため、この機能の向上は必須でした。(2024/06/19)
タブではカーソルを合わせたときと選択したときで色が変わるようにしていますが、ボタンにもこれを適応できないかと思い"tk"から"ttk"に変更したら簡単に実装できました。スクロールバーもttkに変更したら今まで少し気になっていた不具合も解消されたし、もっと早くにやっておけばよかった。ただチェックボタンとエントリーボックスはtkの方がうるさくなくてよいです。(2024/06/19)
なぜかpowderだけhwのbin設定がうまく機能していませんでした。コピペしたはずなのになぜでしょうね?と思ったら参照するエントリーボックスが単結晶のままでした。(2024/06/19)
今後実装予定の機能について
1次元カットのグラフをfittingできるプログラムを作成中です。ガウシアンとローレンツィアンでピークフィットできるようにしたいです。
-> なかなかうまくいかないものです。特にfittingするピークの数を増やすところが難しいですね。grafittiの凄さを実感しています。
-> サブウィンドウを出すと挙動が安定しません。fittingは補助的な役割なのでOriginなどの専用ソフトを用いた方が良いかもしれません。
-> 心が折れそうです。
-> すみません。ちょっと一時諦めます。他の業務もありますし、fittingに関しては完全にadvancedです。
"data construction"で作成した4次元行列(U,V,E,I)をsave&loadする機能を作成する予定です。どういったデータ形式になるのかは未定です。
ASYURAではfor文の中にif文が入っており、処理スピードの向上のためにはプログラムの改訂が必要だと認識しています。今度for文の中にif文が入っていた場合どのくらい処理が遅くなるのか検証してみようと思います。
dictionary機能が優秀なのでコードを丸っと書き換えようと思っています。
任意軸方向の2次元スライス及び1次元カットをする機能を作成したいです。
-> テストモードの作成及び挙動テストが終わりました。実装までしばらくお待ちください。
-> 正直、なんで本家のコードでは動かないのか謎です。
-> できたわ。ラベルの作成がかなり難しかった。
About me
ソフトウェアの製作者である菊地帆高個人のHPはこちら