Skip to content

feat: initial commit on getmud module #175

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yucongalicechen
Copy link
Collaborator

closes #166
Initial commit. Probably needs a bit more discussion on what's the most useful here.

Copy link

codecov bot commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.33%. Comparing base (89de7c2) to head (d2d6371).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
+ Coverage   99.31%   99.33%   +0.02%     
==========================================
  Files           5        6       +1     
  Lines         292      302      +10     
==========================================
+ Hits          290      300      +10     
  Misses          2        2              
Files with missing lines Coverage Δ
tests/test_getmud.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@sbillinge sbillinge left a comment

Choose a reason for hiding this comment

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

please see comments. I am a little confused what is going on here. Do we have UCs for these functionalities? What is the user wanting to do? Once we know that we can design what the functions should do and capture that in tests. Only then do we write any functions.

"mud": 2.0,
"diameter": 1.5,
"sample_composition": "ZrO2",
"energy": 20,
Copy link
Contributor

Choose a reason for hiding this comment

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

it is probably a better test if we use reasonable energies. These would be Cu Kalpha, Mo Kalpha, Ag Kalpha. They don't have to be exact but ballpark,

mu = compute_mu_using_xraydb(
sample_composition, energy, sample_mass_density, packing_fraction
)
return mud / mu
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't mud/ mu = d?

diameter : float
The given diameter of the sample capillary in mm.
"""
mu = compute_mu_using_xraydb(
Copy link
Contributor

Choose a reason for hiding this comment

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

comment out and replace with pass. Let's just work on tests to begin with, until we learn what we want the function to do.

mud : float
The given product of attenuation coefficient mu
in mm^{-1} and capillary diameter in mm.
sample_composition : str
Copy link
Contributor

Choose a reason for hiding this comment

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

These are not needed presumably. If I know mud and I know mu then nothing else matters.

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.

USE CASES:
2 participants