Skip to content

Fix bugs, typos, and improve DataFrame efficiency - #5

Merged
eacharles merged 2 commits into
mainfrom
eac/fixes-and-efficiency
Jun 27, 2026
Merged

Fix bugs, typos, and improve DataFrame efficiency#5
eacharles merged 2 commits into
mainfrom
eac/fixes-and-efficiency

Conversation

@eacharles

Copy link
Copy Markdown
Contributor
  • Fix len(dataframe) bug in reduceShearDataForCell (should be len(reduced))
  • Fix duplicate n_uniques assignment and dead x_cents/y_cents overwrites in output_tables
  • Rename _emtpyCountsMaps -> _emptyCountsMaps
  • Fix g_2 docstring saying "g1 component"
  • Fix typos: statisitics, postion, sourcrs, measurment, Attritubes, outout
  • Add .copy() in wcs_match to avoid SettingWithCopyWarning
  • Fix input mutation in makeMatchedShearSourceCatalogs
  • Make ns processing explicit to avoid fragile ordering dependency
  • shearReport now returns ShearData for programmatic use
  • Use numpy arrays instead of Series for arithmetic in reduceShearDataForCell and shearStats
  • Filter early in splitByTypeAndClean to avoid computing columns on discarded rows
  • Replace merge-on-synthetic-idx with pandas.concat for row-aligned tables
  • Eliminate redundant DataFrame copy in reduceShearDataForCell

Generated with AI

Co-Authored-By: SLAC AI

- Fix len(dataframe) bug in reduceShearDataForCell (should be len(reduced))
- Fix duplicate n_uniques assignment and dead x_cents/y_cents overwrites in output_tables
- Rename _emtpyCountsMaps -> _emptyCountsMaps
- Fix g_2 docstring saying "g1 component"
- Fix typos: statisitics, postion, sourcrs, measurment, Attritubes, outout
- Add .copy() in wcs_match to avoid SettingWithCopyWarning
- Fix input mutation in makeMatchedShearSourceCatalogs
- Make ns processing explicit to avoid fragile ordering dependency
- shearReport now returns ShearData for programmatic use
- Use numpy arrays instead of Series for arithmetic in reduceShearDataForCell and shearStats
- Filter early in splitByTypeAndClean to avoid computing columns on discarded rows
- Replace merge-on-synthetic-idx with pandas.concat for row-aligned tables
- Eliminate redundant DataFrame copy in reduceShearDataForCell

Generated with AI

Co-Authored-By: SLAC AI
Coverage improvements:
- shear_utils: 73% → 100%
- shear_data: 80% → 96%
- Overall: 92% → 96%

All tests use synthetic data with no external dependencies.

Generated with AI

Co-Authored-By: SLAC AI
@eacharles
eacharles force-pushed the eac/fixes-and-efficiency branch from 53e8b4c to d866891 Compare June 27, 2026 00:15
@eacharles
eacharles merged commit f1ad8b7 into main Jun 27, 2026
4 checks passed
@eacharles
eacharles deleted the eac/fixes-and-efficiency branch June 27, 2026 00:20
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.

1 participant