Ignore:
Timestamp:
Nov 26, 2012, 8:57:18 PM (12 years ago)
Author:
steve
Message:

Testing visualising height quantity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/visualiser/commandline_viewer.py

    r7276 r8649  
    3939        # the stage height:
    4040        # 0 and 10 are the minimum and maximum values of the stage.
    41         o.colour_height_quantity('stage', (lambda q: q['stage'], 0, 10))
     41        o.colour_height_quantity('stage', (lambda q: q['stage'], 1.0, 5.0))
    4242        # Or with the magnitude of the momentum at that point:
    4343        # Needs the sqrt function from numeric. Again, 0 and 10
    4444        # define the colour range.
    45         # o.colour_height_quantity('stage',
     45        from numpy import sqrt
     46        #o.colour_height_quantity('stage',
    4647        #                          (lambda q:sqrt((q['xmomentum'] ** 2) +
    4748        #                                         (q['ymomentum'] ** 2)),
    4849        #                                          0, 10))
     50        o.colour_height_quantity('stage',
     51                                  (lambda q: q['xmomentum']/
     52                                             (q['stage'] - q['elevation']),
     53                                              0, 5))
     54
     55
     56        # Draw some axes on the visualiser so we can see how big the wave is
     57
    4958
    5059        # Draw some axes on the visualiser so we can see how big the wave is
Note: See TracChangeset for help on using the changeset viewer.