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

Fix 1d bin #130

Merged
merged 31 commits into from
Aug 9, 2024
Merged

Fix 1d bin #130

merged 31 commits into from
Aug 9, 2024

Conversation

DanielaBreitman
Copy link
Collaborator

Fix for bug in calculate_sensitivity_1d_binned:

ska = Observatory.from_profile("SKA-LOW1-core", frequency=band * un.MHz)
obs = p21sense.Observation(
    observatory=ska,
    #TRACK: Need this for track scan option
    # Tracked scan observation duration.
    track=4.*un.hour, 
    #If simulating a tracked scan, `time_per_day` should be a multiple of the length
    #    of the track (i.e. for two three-hour tracks per day, `hours_per_day` should be 6).
    time_per_day=4.*un.hour,
    n_days=180.,
)
sense = PowerSpectrum(observation=obs)
k_bins = np.logspace(np.log10(0.1),np.log10(1.1),20) # this is in Mpc^{-1}
sense1d_sample = sense.calculate_sensitivity_1d_binned(k=k_bins/h*cu.littleh/un.Mpc, 
                                              thermal=False, 
                                              sample=True)
print(len(sense1d_sample), len(k_bins))

output is: 81, 20. Expected output: 20, 20.

Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.59%. Comparing base (dba5c7d) to head (12bf5c5).
Report is 73 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #130   +/-   ##
=======================================
  Coverage   98.59%   98.59%           
=======================================
  Files          15       15           
  Lines        1066     1066           
=======================================
  Hits         1051     1051           
  Misses         15       15           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

DanielaBreitman and others added 19 commits August 8, 2024 15:30
Copy link
Contributor

@steven-murray steven-murray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a bunch @DanielaBreitman! This is looking good, but I think there's an error when setting the location.

@steven-murray steven-murray merged commit 8d6819a into main Aug 9, 2024
27 checks passed
@steven-murray steven-murray deleted the fix_1d_bin branch August 9, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants