~ubuntu-branches/ubuntu/intrepid/horae/intrepid

« back to all changes in this revision

Viewing changes to athena_parts/macro.pl

  • Committer: Bazaar Package Importer
  • Author(s): Carlo Segre
  • Date: 2008-02-23 23:13:02 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080223231302-mnyyxs3icvrus4ke
Tags: 066-3
Apply patch to athena_parts/misc.pl for compatibility with 
perl-tk 804.28.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
  ;
20
20
 
21
21
  $notes{macro} -> tagConfigure('inst', -wrap=>'word');
22
 
  $notes{macro} -> insert('end', $instructions);
 
22
  $notes{macro} -> insert('end', $instructions, "text");
23
23
 
24
24
  my $doneline  = $notecard{macro} -> Frame(qw/-relief flat -borderwidth 2/)
25
25
    -> pack(qw/-fill x -side bottom/);
153
153
end macro
154
154
 
155
155
## making a step function
156
 
macro step x.array x a.step
157
 
  \"Return A.STEP function centered at STEP with X.ARRAY as the x-axis\"
158
 
  n___step = nofx(\$1, \$2) - 1
159
 
  n___points = npts(\$1) - n___step
 
156
macro step x.array shift x a.step
 
157
  \"Return A.STEP function centered at X with X.ARRAY as the x-axis and a SHIFT energy shift\"
 
158
  set t___oss.x     = \$1 + \$2
 
159
  set n___step      = nofx(t___oss.x, \$3) - 1
 
160
  set n___points    = npts(\$1) - n___step
160
161
  set t___oss.zeros = zeros(n___step)
161
162
  set t___oss.ones  = ones(n___points)
162
 
  set \$3 = join(t___oss.zeros, t___oss.ones)
 
163
  set \$4 = join(t___oss.zeros, t___oss.ones)
163
164
end macro
164
165
 
165
166