Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Known Issue: Reflectance Calc #19

Open
amcmahon01 opened this issue Dec 15, 2020 · 1 comment
Open

Known Issue: Reflectance Calc #19

amcmahon01 opened this issue Dec 15, 2020 · 1 comment
Assignees
Labels

Comments

@amcmahon01
Copy link
Member

Correction exists in "2020_Improvements" branch but hasn't been merged.

Old (BasicProcessing.py: line 435):

#reflec = (I_up / I_WP) * (I_trg / I_up)
# Edited by A. McMahon 11/9/15 - Channels A and B swapped

refl[s_idx, 1] = (stop[consts.int_CH_B] / WP_data[s_idx][consts.int_CH_A]) * (stop[consts.int_CH_A] / stop[consts.int_CH_B])

Corrected:

#reflec = (WP_upwelling / WP_downwelling) * (stop_downwelling / stop_upwelling)
#Normally, chan A = downwelling, chan B = upwelling

refl[s_idx, 1] = (WP_data[s_idx][consts.int_CH_B] / WP_data[s_idx][consts.int_CH_A]) * (stop[consts.int_CH_A] / stop[consts.int_CH_B])

@amcmahon01 amcmahon01 added the bug label Dec 15, 2020
@amcmahon01 amcmahon01 self-assigned this Dec 15, 2020
@serbinsh
Copy link
Member

I tried to implement this fix in an older working version of mine, but failed

(py39) Wolfmans-MacPro-Desktop:UniSpec_Processing sserbin$ python src/Main.py
Found 2 runs in /Volumes/TEST/Projects/NGEE-Arctic/Data/Barrow/Spectra/Tram_UniSpec-DC/2015_Data/20150611/.
	WPs	Stops

0:	3	137
1:	3	137
2:	3	137
Saturated Measurement Count
		Ch_B	Ch_A

0 WPs and 0 stops saturated.
Traceback (most recent call last):
  File "/Users/sserbin/Data/GitHub/UniSpec_Processing/src/Main.py", line 88, in <module>
    main()
  File "/Users/sserbin/Data/GitHub/UniSpec_Processing/src/Main.py", line 76, in main
    R = spec.refl(intdata_Stops, avg_WP)
  File "/Users/sserbin/Data/GitHub/UniSpec_Processing/src/BasicProcessing.py", line 412, in refl
    refl[s_idx, 1] = (WP_data[s_idx][consts.int_CH_B] / WP_data[s_idx][consts.int_CH_A]) * (stop[consts.int_CH_A] / stop[consts.int_CH_B])
IndexError: index 3 is out of bounds for axis 0 with size 3

Just an FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants