All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

Login


All New
's Avatar

yuanpeng

Joined 1711835704

Recently created
Least recently created
Recently updated
Least recently updated
All gists 36
yuanpeng's Avatar

yuanpeng / texture_corr_steps.md

0 likes
0 forks
1 files
Last active 1742241867

Steps for Texture Correction

  1. First, we need to prepare the grouping file, which will divide detectors into small groups according to the polar and azimuthal angles. The MantidTotalScattering (MTS) reduction will then take the grouping file for reducing data into those small groups.

    • Go to /SNS/NOM/shared/scripts/texture and run the texture_group_gen.py script like this,

      mantidpython texture_group_gen.py
      
yuanpeng's Avatar

yuanpeng / output_group.json

0 likes
0 forks
1 files
Last active 1742234993
1 {
2 "bank_1": [0, 35],
3 "bank_2": [35, 55],
4 "bank_3": [55, 75],
5 "bank_4": [75, 105],
6 "bank_5": [105, 135],
7 "bank_6": [135, 180]
8 }
yuanpeng's Avatar

yuanpeng / texture_proc_real_1step_not_aligned_2step_aligned.py

0 likes
0 forks
1 files
Last active 1742233591
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's Avatar

yuanpeng / ttheta_group_params_new_new_new.json

0 likes
0 forks
1 files
Last active 1742232659
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's Avatar

yuanpeng / NOMAD_Invalid_groups_exported_1.csv

0 likes
0 forks
1 files
Last active 1742232235
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's Avatar

yuanpeng / remove_invalid_banks.py

0 likes
0 forks
1 files
Last active 1742232072
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's Avatar

yuanpeng / wksp2data.py

0 likes
0 forks
1 files
Last active 1742231427
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's Avatar

yuanpeng / silicon.json

0 likes
0 forks
1 files
Last active 1742231017
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's Avatar

yuanpeng / powgen_mts.json

0 likes
0 forks
1 files
Last active 1741129164
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's Avatar

yuanpeng / uniform_move_snippet

0 likes
0 forks
1 files
Last active 1736964636
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
Newer Older

Powered by Opengist ⋅ Load: 232ms⋅

English
Čeština English Español Français Magyar Português Русский 中文 繁體中文