At a given time step, the bar angle retrieved from pattern.find_barangle() is not the same as that found by running pattern.bar_fourier_compute(). Sample work flow below. Ex - at time index 556 in the simulation I'm looking at, pattern.find_barangle() gives 69.28 and pattern.bar_fourier_compute() gives ~1.4 (exact value depends on the chosen values for minr and maxr).
EOF2Dict = eof.read_binary_eof_coefficients_dict('sim_directory/outcoef.star.run2Fb')
DCp = eof.calculate_eof_phase(EOF2Dict)
eof.print_eof_barfile(DCp,simulation_directory='sim_directory/',\
simulation_name='2Fb',morder=2,norder=0)
BarInstance = pattern.BarDetermine()
BarInstance.read_bar('sim_directory/2Fb_m2n0_barpos.dat')
''' BarInstance.unwrap_bar_position() - have tried with and without unwrapping'''
pattern.find_barangle(BarInstance.time[556], BarInstance, interpolate=False) #interpolate = True gives NaN, which seems to be a separate issue, but here I am giving an exact time in the simulation so no interpolation should be needed
file = psp_io.Input('sim_directory/OUT.run2Fb.00556',comp='star')
bangle = bar_fourier_compute(file.data['x'],file.data['y']) #have set various rmin, rmax