Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
plotfile containing overlays
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
matei  
View profile  
 More options Nov 14 2008, 9:02 pm
From: matei <ma...@uottawa.ca>
Date: Fri, 14 Nov 2008 18:02:57 -0800 (PST)
Local: Fri, Nov 14 2008 9:02 pm
Subject: plotfile containing overlays
In a problem of a propagating wave, I am interested in superposing the
wave front at different times on the same image.  For example, say I
have the solutions at times t1, t2 and t3.  I want to plot first the
solution at t3, than overlay the solution at t2 extending partly over
t3, but not all the way to the front.  Then overlay the solution at
t1, and so on.  The end plot would be a sequence of the wave fronts.
Ahead of each wave front, i would have sufficient white space to avoid
visual clutter and confusion.

Right now, I call the same plotting procedure iteratively using the
stored solutions at different times, within the same plotfile block.
I use
plot image {G1} m<myfavoritefield[]>
instead of
plot image {G} m<myfavoritefield[]>
in the plotting procedures in order to avoid plotting the entire base
grid.  However, this workaround is not very elegant, and does not give
sufficient white space demarcation ahead of the wave until the t-1
solution.
Any ideas of a better strategy?  Perhaps I can add white rectangles to
make better controlled demarcations.  I could plot these interposed
between the successive timesolutions.

James, this is like what i had (manually) last year for the APS poster
with the overlay of the schlieren snap shots and the soot foil.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Quirk  
View profile  
 More options Nov 14 2008, 9:34 pm
From: James Quirk <j...@galcit.caltech.edu>
Date: Fri, 14 Nov 2008 18:34:02 -0800 (PST)
Local: Fri, Nov 14 2008 9:34 pm
Subject: Re: plotfile containing overlays
Matei,

You should use the plotarea command to fix the active drawing
area on the page, see:

    amrhelp plotarea

and you'll need to activate clipping with:

    clipping on

Have a stab at it, and if you get stuck I'll
help you further.

James


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
matei  
View profile  
 More options Nov 14 2008, 9:44 pm
From: matei <ma...@uottawa.ca>
Date: Fri, 14 Nov 2008 18:44:07 -0800 (PST)
Local: Fri, Nov 14 2008 9:44 pm
Subject: Re: plotfile containing overlays
Yes, thanks.  I see where to go with this.  It's essentially what I
was doing by hand last year using adobe illustrator to clip the
various profiles over a desired area.

However, I have to automate it, so the bounds of the plotarea need to
change dynamically with the position of the shock.  Is there a
procedure to find the location of the leading shock already build in?

On Nov 14, 9:34 pm, James Quirk <j...@galcit.caltech.edu> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Quirk  
View profile  
 More options Nov 14 2008, 10:42 pm
From: James Quirk <j...@galcit.caltech.edu>
Date: Fri, 14 Nov 2008 19:42:03 -0800 (PST)
Local: Fri, Nov 14 2008 10:42 pm
Subject: Re: plotfile containing overlays

On Fri, 14 Nov 2008, matei wrote:

> Yes, thanks.  I see where to go with this.  It's essentially what I
> was doing by hand last year using adobe illustrator to clip the
> various profiles over a desired area.

> However, I have to automate it, so the bounds of the plotarea need to
> change dynamically with the position of the shock.  Is there a
> procedure to find the location of the leading shock already build in?

You can use the along command. Suppose you have a wave moving
from left to right then you would use something along the lines of:

   along y=$ymid locate last P[]>$Ptol -> Xfront

James


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
matei  
View profile  
 More options Nov 14 2008, 11:43 pm
From: matei <ma...@uottawa.ca>
Date: Fri, 14 Nov 2008 20:43:34 -0800 (PST)
Local: Fri, Nov 14 2008 11:43 pm
Subject: Re: plotfile containing overlays
Thanks, that should do it.

On Nov 14, 10:42 pm, James Quirk <j...@galcit.caltech.edu> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gary Sharpe  
View profile  
 More options Nov 15 2008, 6:21 am
From: Gary Sharpe <men...@leeds.ac.uk>
Date: Sat, 15 Nov 2008 03:21:31 -0800 (PST)
Local: Sat, Nov 15 2008 6:21 am
Subject: Re: plotfile containing overlays
Matei, there should be some examples of shock position tracking
in the scripts I sent Carlos, using the along command.

On Nov 15, 3:44 am, matei <ma...@uottawa.ca> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
matei  
View profile  
 More options Nov 15 2008, 5:18 pm
From: matei <ma...@uottawa.ca>
Date: Sat, 15 Nov 2008 14:18:37 -0800 (PST)
Local: Sat, Nov 15 2008 5:18 pm
Subject: Re: plotfile containing overlays
Ok, Brian and I got it to work.  The following part of script plots
the overlays.  Note the difficulty due to the fact that plotarea
requires dimensions in mm on the page, different from the grid
coordinates.

---
set Ptol=1.1
proc MateiRed
   RGB<255,0,0>
end proc
plotfile ps/density/densityend.ps
   PlotDomain fcolour  = m<1.0> , bcolour = MateiRed
   bbox in mm -> xmm1,ymm1,xmm2,ymm2
   bbox  -> x1,y1,x2,y2
   set mmscale #= $ymm2/ $y2
   do m=48,1,-5
       flowin io/default/Pulse$m
       echo $m
       along y=10 locate last P[]>$Ptol -> Xfront
       set plotx1 #= ($Xfront-30)*$mmscale + $xmm1
       set plotwidth #= 40*$mmscale
       plotarea $plotx1, $ymm1,$plotwidth,$ymm2
       clipping on
       DensityPlot
   end do
   clipping off
   DrawCylinderBody <- ParamSet::
plotfile
---


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Quirk  
View profile  
 More options Nov 16 2008, 12:09 pm
From: James Quirk <j...@galcit.caltech.edu>
Date: Sun, 16 Nov 2008 09:09:41 -0800 (PST)
Local: Sun, Nov 16 2008 12:09 pm
Subject: Re: plotfile containing overlays

On Sat, 15 Nov 2008, matei wrote:

> Ok, Brian and I got it to work.  The following part of script plots
> the overlays.  Note the difficulty due to the fact that plotarea
> requires dimensions in mm on the page, different from the grid
> coordinates.

It would be fairly straightforward to take what you've
done and package it in a procedure so that all the
scaling machinations are hidden away, and then you'd
end up with something that could be used transparently
by third parties.

James


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Quirk  
View profile  
 More options Nov 17 2008, 10:34 pm
From: James Quirk <j...@galcit.caltech.edu>
Date: Mon, 17 Nov 2008 19:34:13 -0800 (PST)
Local: Mon, Nov 17 2008 10:34 pm
Subject: RE: plotfile containing overlays
Matei,

On Mon, 17 Nov 2008, Matei Radulescu wrote:
> james,
> I can post something like that shortly, although I'm not a 100%
> comfortable with passing variables and commands to call other
> procedures.  Do I pass those as strings?  For example, I want to pass
> the PlotDensity command to the procedure, so that it calls PlotDensity
> from within the procedure.  Let me clean it up a little and give it a
> shot.
> matei

There's more than one way it could be done.  But as a first step,
I would suggest you try something very simple and not even bother
to pass the drawing commands to the procedure. For instance,
you could use:

PlotWholeChannel
do n=1,$n
   flowin io/soln$n
   FocusOnFront
   DensityPlot
end do

Have a stab at it and I'll answer any specific questions you might
have.

James


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
matei  
View profile  
 More options Nov 18 2008, 9:47 pm
From: matei <ma...@uottawa.ca>
Date: Tue, 18 Nov 2008 18:47:24 -0800 (PST)
Local: Tues, Nov 18 2008 9:47 pm
Subject: Re: plotfile containing overlays
James,
> Have a stab at it and I'll answer any specific questions you might

I stabbed it.   There are two procedures that need to be called back
to back, as in your example:
--
fold::amrita{ PlotWholeChannel
   proc PlotWholeChannel
      PlotDomain fcolour  = m<1.0>
      bbox in mm -> xmm1,ymm1,xmm2,ymm2
      bbox  -> x1,y1,x2,y2
      set ScaleParam::mmscale #= $ymm2/ $y2
      set ScaleParam::xmm1 #= $xmm1
      set ScaleParam::xmm2 #= $xmm2
      set ScaleParam::ymm1 #= $ymm1
      set ScaleParam::ymm2 #= $ymm2
   end proc
}

fold::amrita{ PlotFront
   proc PlotFront{
        pc      = SchlierenImage  #Plot Command
        ys      = 0               #y-line along which to determine
leading shock location
        Ptol    = 1.1             #value of P used as threhhold to
find the shock
        Xback   = 5               #extent of the window to the back of
shock
        Xfront  = 5               #extent of the plot window to the
front of the shock
        mmscale = 1               #scale parameters
        xmm1    = 1
        xmm2    = 1
        ymm1    = 1
        ymm2    = 1
      } <-ScaleParam::
      along y=$ys locate last P[]>$Ptol -> Xshock
      set plotx1 #= ($Xshock-$Xback)*$mmscale + $xmm1
      set plotwidth #= ($Xback+$Xfront)*$mmscale
      plotarea $plotx1, $ymm1,$plotwidth,$ymm2
      clipping on
      $pc
   end proc
}

plotfile ps/myplot.ps
   PlotWholeChannel
   do n = 1, $n
      flowin io/model$n
      PlotFront{
         pc =DensityPlot
         Xback=10
      }
   end do
   clipping off
plotfile

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Quirk  
View profile  
 More options Nov 18 2008, 10:23 pm
From: James Quirk <j...@galcit.caltech.edu>
Date: Tue, 18 Nov 2008 19:23:45 -0800 (PST)
Local: Tues, Nov 18 2008 10:23 pm
Subject: Re: plotfile containing overlays
Matei,

I would move the clipping off command to
the PlotFront procedure so that you have:

   clipping on
      $pc
   clipping off

so that the clipping commands are balanced
at the point of use. I would also replace $pc by

   parse <token> pc

to allow multi-line parameters, as in:

   PlotFront {
      fold::param'pc {
         DensityPlot
         plot Z[] contour L0.9 rgb<1,0,0>    
      }
   }

James


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
matei  
View profile  
 More options Nov 19 2008, 10:25 am
From: matei <ma...@uottawa.ca>
Date: Wed, 19 Nov 2008 07:25:14 -0800 (PST)
Local: Wed, Nov 19 2008 10:25 am
Subject: Re: plotfile containing overlays
James,
Here are the updated procedures with your recommendations.  Thanks for
your help.  They are working nicely.

fold::amrita{ PlotWholeChannel
   proc PlotWholeChannel
      PlotDomain fcolour  = m<1.0>
      bbox in mm -> xmm1,ymm1,xmm2,ymm2
      bbox  -> x1,y1,x2,y2
      set ScaleParam::mmscale #= $ymm2/ $y2
      set ScaleParam::xmm1 #= $xmm1
      set ScaleParam::xmm2 #= $xmm2
      set ScaleParam::ymm1 #= $ymm1
      set ScaleParam::ymm2 #= $ymm2
   end proc

}

fold::amrita{ PlotFront
   proc PlotFront{
        pc      = SchlierenImage  #Plot Command
        ys      = 0               #y-line along which to determine
leading shock location
        Ptol    = 1.1             #value of P used as threhhold to
find the shock
        Xback   = 5               #extent of the window to the back of
shock
        Xfront  = 5               #extent of the plot window to the
front of the shock
        mmscale = 1               #scale parameters
        xmm1    = 1
        xmm2    = 1
        ymm1    = 1
        ymm2    = 1
      } <-ScaleParam::
      along y=$ys locate last P[]>$Ptol -> Xshock
      set plotx1 #= ($Xshock-$Xback)*$mmscale + $xmm1
      set plotwidth #= ($Xback+$Xfront)*$mmscale
      plotarea $plotx1, $ymm1,$plotwidth,$ymm2
      clipping on
      parse <token> pc
      clipping off
   end proc
}

plotfile ps/density_evolution.ps
   PlotWholeChannel
   do n = 1, $n
      flowin io/model$n
      PlotFront{
         ys = 59.99
         Xback = 60
         Xfront = 20
         fold::param'pc {
            DensityPlot
            plot Z[] contour L0.9 rgb<1,0,0>
         }
      }
   end do
plotfile

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Quirk  
View profile  
 More options Nov 19 2008, 10:33 am
From: James Quirk <j...@galcit.caltech.edu>
Date: Wed, 19 Nov 2008 07:33:40 -0800 (PST)
Local: Wed, Nov 19 2008 10:33 am
Subject: Re: plotfile containing overlays
Matei,

On Wed, 19 Nov 2008, matei wrote:

> James,
> Here are the updated procedures with your recommendations.  Thanks for
> your help.  They are working nicely.

There's one last step you could do.  If you employ
Amrita's utilize command your new procedures can be
squirreled away and then accessed using something
along the lines of:

   utilize mateis::utils
   ...
   PlotWholeDomain

This would allow you to build up your own extensions
that could be used from student to student.

James


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
matei  
View profile  
 More options Nov 19 2008, 5:12 pm
From: matei <ma...@uottawa.ca>
Date: Wed, 19 Nov 2008 14:12:12 -0800 (PST)
Local: Wed, Nov 19 2008 5:12 pm
Subject: Re: plotfile containing overlays

On Nov 19, 10:33 am, James Quirk <j...@galcit.caltech.edu> wrote:

[mir] That's a good idea. I guess this is short from putting them
directly on the Amrita path where it looks for the *.amr procedures,
right?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Quirk  
View profile  
 More options Nov 19 2008, 5:20 pm
From: James Quirk <j...@galcit.caltech.edu>
Date: Wed, 19 Nov 2008 14:20:54 -0800 (PST)
Local: Wed, Nov 19 2008 5:20 pm
Subject: Re: plotfile containing overlays

amrhelp utilize

describes how the utilize command hunts for resources.

James


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google