yuanpeng / texture_proc_real_1step_not_aligned_2step_aligned.py
0 likes
0 forks
1 files
Last active
1 | import json |
2 | import numpy as np |
3 | import os |
4 | import scipy |
5 | from scipy.optimize import minimize |
6 | from scipy.optimize import curve_fit |
7 | from scipy.signal import argrelextrema |
8 | from pystog import Pre_Proc |
9 | import matplotlib.pyplot as plt |
10 | import random |
yuanpeng / ttheta_group_params_new_new_new.json
0 likes
0 forks
1 files
Last active
1 | { |
2 | "Group-1": { |
3 | "QRange": { |
4 | "12": { |
5 | "LeftBound": 0.5, |
6 | "RightBound": 7.8 |
7 | }, |
8 | "17": { |
9 | "LeftBound": 0.75, |
10 | "RightBound": 7.8 |
yuanpeng / NOMAD_Invalid_groups_exported_1.csv
0 likes
0 forks
1 files
Last active
1 | 2Theta,Group ID |
2 | 2,1 |
3 | 2,2 |
4 | 2,3 |
5 | 2,4 |
6 | 2,5 |
7 | 2,6 |
8 | 2,7 |
9 | 2,8 |
10 | 2,9 |
yuanpeng / remove_invalid_banks.py
0 likes
0 forks
1 files
Last active
1 | import csv |
2 | import numpy as np |
3 | import os |
4 | |
5 | data = [] |
6 | |
7 | csv_file = 'NOMAD_Invalid_groups_exported_1.csv' |
8 | |
9 | with open(csv_file, 'r') as file: |
10 | csv_reader = csv.reader(file) |
yuanpeng / wksp2data.py
0 likes
0 forks
1 files
Last active
1 | # import mantid algorithms, numpy and matplotlib |
2 | from mantid.simpleapi import * |
3 | import matplotlib.pyplot as plt |
4 | import numpy as np |
5 | import os |
6 | from pathlib import Path |
7 | |
8 | nxs_file = "./SofQ/NOM_Si_640e.nxs" |
9 | out_dir = "./texture_proc" |
yuanpeng / silicon.json
0 likes
0 forks
1 files
Last active
1 | { |
2 | "Facility": "SNS", |
3 | "Instrument": "NOM", |
4 | "Title": "NOM_Si_640e", |
5 | "Sample": { |
6 | "Runs": "200047, 200048", |
7 | "Background": { |
8 | "Runs": "200044", |
9 | "Background": { |
10 | "Runs": "200046" |
yuanpeng / powgen_mts.json
0 likes
0 forks
1 files
Last active
1 | { |
2 | "Facility": "SNS", |
3 | "Instrument": "PG3", |
4 | "Title": "pg3_test", |
5 | "Sample": { |
6 | "Runs": "53601", |
7 | "Background": { |
8 | "Runs": "51877", |
9 | "Background": { |
10 | "Runs": "51909" |
yuanpeng / uniform_move_snippet
0 likes
0 forks
1 files
Last active
1 | ! For the polar angle part, since projection is involved and therefore |
2 | ! we need to guarantee that the projection is uniform. We don't need |
3 | ! to do this for the phi angle since only rotation is involved in |
4 | ! that case. |
5 | polar_ang = dacos(2.0d0*(rmca_ran(1)-0.5d0)) |
6 | azim_ang = rmca_ran(1) * 2.0d0 * pi |
7 | rand_x = delta(move_type) * dsin(polar_ang) * dcos(azim_ang) |
8 | rand_y = delta(move_type) * dsin(polar_ang) * dsin(azim_ang) |
9 | rand_z = delta(move_type) * dcos(polar_ang) |
10 | ! We go from the Cartesian coordinates to fractional with respect |
yuanpeng / dify_docker_compose.yml
0 likes
0 forks
1 files
Last active
1 | services: |
2 | api: |
3 | image: langgenius/dify-api:0.14.0 |
4 | restart: always |
5 | environment: |
6 | MODE: api |
7 | LOG_LEVEL: INFO |
8 | SECRET_KEY: O/PzhwXRXX+8rv8CK144R8EPdFkOFODB/1QwI8iR4FApqah50KJD9gcU |
9 | CONSOLE_WEB_URL: '' |
10 | INIT_PASSWORD: '' |
yuanpeng / HaoL_stog_notes_12122024.txt
0 likes
0 forks
1 files
Last active
1 | 首先,stog是有两个不同的package,一个是在RMCProfile里边打包的,直接在RMCProfile的命令行里就可以执行的,命令是'stog_new',具体的使用说明在这里,https://rmcprofile.ornl.gov/data-pre-processing-for-rmcprofile/ |
2 | |
3 | 你在文档里提到是stog的Python版本,功能上跟上面的版本是一样的,可能还会更丰富些,包括data rebinning这些都可以在pystog里边做。 |
4 | |
5 | 针对data rescaling的需求,两个版本需要的参数基本是一对一对应的,这些参数的说明在上面提到的链接里都有,有可能名字是不一样的,比如你提到的rho,也叫做number density,这个在连接里也有提到。另外你在文档里提到的pystog的参考文档的使用方式是可以,但是其实它有一种更简便的办法,可以参照这里的文档,https://powder.ornl.gov/total_scattering/data_reduction/ts_pp.html,在这里你就能看到,它的输入和RMCProfile版本的stog是基本一对一对应的。参数说明上面的两个链接里都有介绍,应该是比较清楚的,有问题的话可以找我哈。值得一提的是你提到的<b_coh>^2,这个叫做Faber-Ziman系数,是由composition决定的,可以在这里说如composition进行计算,https://addie.ornl.gov/helpsheet,在结果的显示页里,关于它的定义也是有介绍的。 |
6 | |
7 | 在上面提到的第二个链接里,有一个Google Colab Notebook的链接,点进去直接运行所有的cells一步一步可以跟着做,主要就是利用pystog的一些基础功能做一些rebin,傅里叶变换,数据格式转换这些。'stog_new'和里边提到的'pystog_cli'(它的输入文件是一个json文件)就是把这些基础攒在一起直接take in reciprocal space data,做rescaling,傅里叶变换等等这些,in a single shot。 |
8 | |
9 | 我之前分享给你的数据都是经历过scaling的步骤的,就是都用‘pystog_cli’处理过,如果需要rescale的话,就需要用到原始的reciprocal space的数据,它不在你文档里show的那张图里边,你的数据的话可以去这里找,/SNS/NOM/IPTS-33670/shared/autoreduce/multi_banks_summed/SofQ_merged,里边所有以merged.sq结尾的数据都是原始的,没有经过任何rescaling的reciprocal space的数据。 |