@@ -702,16 +702,20 @@ you want to examine a line-of-sight vector within a 3-D data object, set the
702
702
# Set to a three-vector for an off-axis component
703
703
dd.set_field_parameter(" axis" , [0.3 , 0.4 , - 0.7 ])
704
704
print (dd[" gas" , " velocity_los" ])
705
+ # particle fields are supported too!
706
+ print (dd[" all" , " particle_velocity_los" ])
705
707
706
708
.. warning ::
707
709
708
710
If you need to change the axis of the line of sight on the *same * data container
709
- (sphere, box, cylinder, or whatever), you will need to delete the field using
711
+ (sphere, box, cylinder, or whatever), you will need to delete the field using (e.g.)
710
712
``del dd['velocity_los'] `` and re-generate it.
711
713
712
714
At this time, this functionality is enabled for the velocity and magnetic vector
713
- fields, ``('gas', 'velocity_los') `` and ``('gas', 'magnetic_field_los') ``. The
714
- following fields built into yt make use of these line-of-sight fields:
715
+ fields, ``('gas', 'velocity_los') `` and ``('gas', 'magnetic_field_los') `` for
716
+ the ``"gas" `` field type, as well as every particle type with
717
+ a velocity field, e.g. ``("all", "particle_velocity_los") ``. The following fields
718
+ built into yt make use of these line-of-sight fields:
715
719
716
720
* ``('gas', 'sz_kinetic') `` uses ``('gas', 'velocity_los') ``
717
721
* ``('gas', 'rotation_measure') `` uses ``('gas', 'magnetic_field_los') ``
0 commit comments