Simulate FAST System Noise on Blurred Map with Python
import pandas as pd import numpy as np
add FAST system noise on the blur map to simulate true observed map
sigma = 800 # 'mu Jy', Standard Deviation of noise
read map
filepath = '/home/wangjiaxin/final/blurred/flux_blurred_all_gal_300f.hdf5' S_df = pd.read_hdf(filepath, key='S')
xbin_df = pd.read_hdf(filepath, key='x_bin_edge') ybin_df = pd.read_hdf(filepath, key='y_bin_edge') fbin_df = pd.read_hdf(filepath, key='nu_bin_edge')
add noise
noise = np.random.normal(0, sigma, S_df.shape) newdata = S_df + noise
save
output = '/home/dyliu/Filament/TNG_100/flux_blurred_all_gal_300f_800n.hdf5' newdata.to_hdf(output, key='S', mode='w') xbin_df.to_hdf(output, key='x_bin_edge', mode='w') ybin_df.to_hdf(output, key='y_bin_edge', mode='w') fbin_df.to_hdf(output, key='nu_bin_edge', mode='w')
原文地址: https://www.cveoy.top/t/topic/nesc 著作权归作者所有。请勿转载和采集!