tardis.transport.montecarlo.weighted_packet_source module¶
- class tardis.transport.montecarlo.weighted_packet_source.BlackBodyWeightedSource(*args, **kwargs)[source]¶
 Bases:
BlackBodySimpleSourceSimple packet source that generates Blackbody packets for the Montecarlo part.
- Parameters:
 - radiusastropy.units.Quantity
 Initial packet radius
- temperatureastropy.units.Quantity
 Absolute Temperature.
- base_seedint
 Base Seed for random number generator
- legacy_secondary_seedint
 Secondary seed for global numpy rng (Deprecated: Legacy reasons only)
- create_packet_energies(no_of_packets)[source]¶
 Set energy weight for each packet from the relative contribution to the Planck Distribution
- Parameters:
 - no_of_packetsint
 number of packets
- Returns:
 - energies for packets
 numpy.ndarray
- create_packet_nus(no_of_packets, l_samples=1000)[source]¶
 Create packet \(\nu\) distributed uniformly over bounds taken from the BlackBodySimpleSource distribution
- Parameters:
 - no_of_packetsint
 - l_samplesint
 number of l_samples needed for sampling from BlackBodySimpleSource
- Returns:
 - array of frequencies
 numpy.ndarray
- hdf_name = 'black_body_weighted_source'¶
 
- hdf_properties = ['radius', 'temperature', 'base_seed']¶