Skip to content

Comments

Convert all variables to camelCase naming convention#1

Open
Copilot wants to merge 2 commits intomainfrom
copilot/fix-94561293-6c3b-46d0-a2ab-186a9cfb903a
Open

Convert all variables to camelCase naming convention#1
Copilot wants to merge 2 commits intomainfrom
copilot/fix-94561293-6c3b-46d0-a2ab-186a9cfb903a

Conversation

Copy link

Copilot AI commented Aug 19, 2025

This PR converts all variable names throughout the codebase from snake_case to camelCase to establish a consistent naming convention across the project.

Changes Made

Global Variables (globals.py)

  • data_perioddataPeriod
  • trig_windowtrigWindow
  • min_trigger_hitsminTriggerHits
  • scint_areascintArea
  • num_scintnumScint
  • min_hitsminHits
  • muon_ratemuonRate
  • p_nohit_bgpNohitBg

Physics Module (physics.py)

  • Function parameters: phone_x/phone_yphoneX/phoneY, s_theta/s_phisTheta/sPhi, det_phidetPhi
  • Energy variables: E_eVeEv, E_GeVeGev, log10_Elog10E
  • Internal variables: r_MrM, upper_energyupperEnergy

Main Module (main.py)

  • Array parameters: sizeOfArrayarraySize (improved naming)
  • Simulation variables: min_EminE, eas_rateeasRate, n_eas_showersnEasShowers
  • Histogram objects: es_shower_hesShowerH, nllr_shower_hnllrShowerH
  • Background variables: bg_scalebgScale, n_bg_eventsnBgEvents
  • Analysis results: signal_llr_valuessignalLlrValues, noise_llr_valuesnoiseLlrValues
  • File operations: output_diroutputDir, csv_filecsvFile, write_headerwriteHeader
  • Timing/memory: start_timestartTime, total_mem_usedtotalMemUsed

Statistical Analysis (likelihood.py)

  • Function parameters updated to use camelCase consistently
  • Statistical variables: mean_signalmeanSignal, std_noisestdNoise, combined_stdcombinedStd
  • Result variables: max_s_over_sqrt_bmaxSOverSqrtB, best_thresholdbestThreshold

Data Processing (plot_metric_results.py)

  • File processing: csv_filescsvFiles, all_dfsallDfs, combined_dfcombinedDf
  • Column validation: required_columnsrequiredColumns, missing_columnsmissingColumns
  • Data structures: metric_datametricData, last_entrieslastEntries

Visualization (testing.py)

  • Grid variables: x_gridxGrid, y_gridyGrid
  • Plot data: metric_valuesmetricValues, X_flatxFlat, valid_indicesvalidIndices

Preserved Naming

  • Function names: Kept as snake_case following Python conventions (calculate_snr, p_nohit, etc.)
  • CSV column names: Preserved for data compatibility (snr_no_sd, p_value, etc.)
  • Module imports: No changes to maintain compatibility

Testing

  • All Python files compile successfully
  • Module imports work correctly
  • Core functionality verified with new variable names
  • Physics calculations and array operations tested

This refactoring improves code consistency while maintaining all existing functionality and preserving external data format compatibility.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: KrishWu <66881117+KrishWu@users.noreply.github.com>
Copilot AI changed the title [WIP] Make it so all variables use camelCase. Convert all variables to camelCase naming convention Aug 19, 2025
Copilot AI requested a review from KrishWu August 19, 2025 19:51
@KrishWu KrishWu marked this pull request as ready for review August 19, 2025 20:40
@KrishWu KrishWu force-pushed the main branch 3 times, most recently from a6b375d to 063b321 Compare August 28, 2025 19:50
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