Skip to content

Commit

Permalink
added helper attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
jberger committed Mar 12, 2013
1 parent b2e0cea commit 7e11d5d
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions lib/Physics/UEMColumn/Pulse.pm
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,13 @@ has 'liouville_gamma2_z' => ( isa => 'Num', is => 'rw', lazy => 1, builder => '_

# variance attribute initializers
method _make_sigma_t () {
return (($self->width)**2) / 2;
return $self->initial_width ** 2 / 2;
}
method _make_sigma_z () {
return (($self->velocity * $self->duration)**2) / 2;
}
return $self->initial_length ** 2 / 2;

method _make_eta_t () {
#me * $energy_fermi / 3 * ( $energy_laser - $work_function ) / ( $energy_laser + $energy_fermi );
return 0;
return me * $self->excess_photoemission_energy / 3;
}
method _make_eta_z () {
return $self->eta_t() / 4;
Expand All @@ -131,6 +129,26 @@ method _make_lg2_z () {
return $self->sigma_z * $self->eta_z;
}

# initialization-only attributes

=item C<initial_width> / C<initial_length>
These attributes are for convenience only. They may be used to initialize the variance attriutes above. They represent the initial half-width 1/e maximum (HW1/eM) width or length of the pulse. Unit: m
=cut

my $unit_length = num_of_unit('m');
has 'initial_width' => ( isa => $unit_length, is => 'ro', default => '1 mm' );
has 'initial_length' => ( isa => $unit_length, is => 'ro', default => '1 mm' );

=item C<initial_width> / C<initial_length>
This attribute is for convenience only. It may be used to initialize the variance attriutes above. It represents the excess photoemission energy imparted to the electrons in the pulse by simple photoemission. Unit: J
=cut

has 'excess_photoemission_energy' => ( isa => num_of_unit('J'), is => 'ro', default => '0.5 eV' );

# propagation history

=item C<data>
Expand Down

0 comments on commit 7e11d5d

Please sign in to comment.