text: import argparse
  import os
  
  from src.lib.main import BohrWeisskopfStep, BohrWeisskopfWSpot
  
  DEBUG_MODE = False
  
  if __name__ == "__main__":
      if DEBUG_MODE:
          bw = BohrWeisskopfStep(a=133,
                                 z=55,
                                 magnetic_ratio=2.582,
                                 nuclear_spin=3.5,
                                 r_rms=4.8041,
                                 momentum=4,
                                 so=False)
  
          bw.save_distribution_to_csv()
  
      else:
          parser = argparse.ArgumentParser(description='Calculate the Bohr-Weisskopf Correction.')
          parser._action_groups.pop()     # hotfix
          required = parser.add_argument_group('required arguments')
          optional = parser.add_argument_group('optional arguments')
          required.add_argument(
              '-a',
              '--atomic_mass',
              type=int,
              help='Atomic mass number (# Nucleons).',
              required=True
          )
          required.add_argument(
              '-z',
              '--atomic_number',
              type=int,
              help='Atomic number (# Protons).',
              required=True
          )
          required.add_argument(
              '-m',
              '--dipole_moment',
              type=float,
              help='Nuclear magnetic dipole moment (in units of nuclear magneton).',
              required=True
          )
          required.add_argument(
              '-i',
              '--spin',
              type=float,
              help='Nuclear spin quantum number.',
              required=True
          )
          required.add_argument(
              '-l',
              '--orbital',
              type=int,
              help='Orbital angular momentum quantum number.',
              required=True
          )
          required.add_argument(
              '-r',
              '--radius',
              type=float,
              help='Root means squared nuclear radius.',
              required=True
          )
          required.add_argument(
              '-so',
              '--spin_orbit',
              type=str,
              help='Account for spin orbit: t/f.',
              required=True
          )
          optional.add_argument(
              '-f',
              '--filename',
              type=str,
              help='wspot data filename.'
          )
          args = parser.parse_args()
  
          if args.spin_orbit == 't':
              spin_orbit = True
          elif args.spin_orbit == 'f':
              spin_orbit = False
          else:
              raise Exception('Invalid spin orbit input, must be t or f.')
  
          if args.filename:
  
              bw = BohrWeisskopfWSpot(a=args.atomic_mass,
                                      z=args.atomic_number,
                                      magnetic_ratio=args.dipole_moment,
                                      nuclear_spin=args.spin,
                                      r_rms=args.radius,
                                      momentum=args.orbital,
                                      filename=args.filename,
                                      so=spin_orbit)
  
          else:
  
              bw = BohrWeisskopfStep(a=args.atomic_mass,
                                     z=args.atomic_number,
                                     magnetic_ratio=args.dipole_moment,
                                     nuclear_spin=args.spin,
                                     momentum=args.orbital,
                                     r_rms=args.radius,
                                     so=spin_orbit)
  
              if not spin_orbit:
                  bw.save_distribution_to_csv(directory=os.path.join(os.getcwd(), 'src', 'bw'))
  
          print(f"BW: {bw.bw_correction()}")
  