Skip to content
Snippets Groups Projects

Updating tutorial notebooks

Merged Isobel Marguarethe Romero-Shaw requested to merge (removed):master into master
All threads resolved!

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Would it be possible to add some comment strings into the code blocks just to be explicit about what each line (or combination of lines) is doing? For example, in compare_samplers.ipynb, you could change:

    time_duration = 1.
    sampling_frequency = 4096.
    
    injection_parameters = dict(mass_1=36., mass_2=29., a_1=0, a_2=0, tilt_1=0, tilt_2=0, phi_12=0, phi_jl=0,
                                luminosity_distance=100., iota=0.4, phase=1.3, waveform_approximant='IMRPhenomPv2',
                                reference_frequency=50., ra=1.375, dec=-1.2108, geocent_time=1126259642.413,
                                psi=2.659)
    
    waveform_generator = bilby.gw.waveform_generator.WaveformGenerator(
        sampling_frequency=sampling_frequency,
        time_duration=time_duration,
        frequency_domain_source_model=bilby.gw.source.lal_binary_black_hole,
        parameters=injection_parameters)
    
    hf_signal = waveform_generator.frequency_domain_strain()

    to

    time_duration = 1.          # set the signal duration in seconds
    sampling_frequency = 4096.  # set the data sampling frequency (Hz)
    
    injection_parameters = dict(mass_1=36.,   # source frame (non-redshifted) primary mass (solar masses)
                                mass_2=29.,   # source frame (non-redshifted) secondary mass (solar masses)
                                a_1=0,        # primary dimensionless spin magnitude
                                a_2=0,        # secondary dimensionless spin magnitude
                                tilt_1=0,     # polar angle between primary spin and the orbital angular momentum (radians)
                                tilt_2=0,     # polar angle between secondary spin and the orbital angular momentum (radians)
                                phi_12=0,     # azimuthal angle between primary and secondary spin (radians)
                                phi_jl=0,     # azimuthal angle between total angular momentum and orbital angular momentum (radians)
                                luminosity_distance=100.,  # luminosity distance to source (Mpc)
                                iota=0.4,     # inclination angle between line of sight and orbital angular momentum (radians)
                                phase=1.3,    # phase (radians)
                                waveform_approximant='IMRPhenomPv2',  # waveform approximant name
                                reference_frequency=50.,  # gravitational waveform reference frequency (Hz)
                                ra=1.375,     # source right ascension (radians)
                                dec=-1.2108,  # source declination (radians)
                                geocent_time=1126259642.413,  # reference time at geocentre (time of coalescence or peak amplitude) (GPS seconds)
                                psi=2.659     # gravitational wave polarisation angle
                                )
    
    # initialise the waveform generator
    waveform_generator = bilby.gw.waveform_generator.WaveformGenerator(
        sampling_frequency=sampling_frequency,
        time_duration=time_duration,
        frequency_domain_source_model=bilby.gw.source.lal_binary_black_hole,
        parameters=injection_parameters)
    
    # generate a frequency domain waveform
    hf_signal = waveform_generator.frequency_domain_strain()
  • Sure. For a notebook example I believe we should have as much explanation as possible. Thank you very much for your example. I'll make these changes today too.

  • added 1 commit

    • 137aead6 - Delete binary_black_holes.prior

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • resolved all discussions

  • added 1 commit

    • 1f929643 - Update compare_samplers.ipynb

    Compare with previous version

  • added 1 commit

    • 76b52a4a - Update compare_samplers.ipynb

    Compare with previous version

  • added 1 commit

    • ff15dbca - Update visualising_the_results.ipynb

    Compare with previous version

  • Gregory Ashton approved this merge request

    approved this merge request

  • Moritz Huebner approved this merge request

    approved this merge request

  • Moritz Huebner mentioned in commit 23401543

    mentioned in commit 23401543

  • Please register or sign in to reply
    Loading