[yt-dev] Issue #1329: frb.data for OffAxisProjectionPlot giving back the exact same array for different fields (yt_analysis/yt)
Christoph Federrath
issues-reply at bitbucket.org
Thu Mar 2 21:43:29 PST 2017
New issue 1329: frb.data for OffAxisProjectionPlot giving back the exact same array for different fields
https://bitbucket.org/yt_analysis/yt/issues/1329/frbdata-for-offaxisprojectionplot-giving
Christoph Federrath:
Hi there,
I have been trying to get off axis projections, but I've wanted to plot the projects with my own code, so have been using frb.data to retrieve the fields
eg.
weighted_proj = yt.OffAxisProjectionPlot(ds, L, ['velx', 'velz', 'magx', 'magz'], center=c, width=(x_width, 'AU'), depth=(args.slice_thickness, 'AU'), weight_field='density')
velx = weighted_proj.frb.data[('flash', 'velx')]
velz = weighted_proj.frb.data[('flash', 'velz')]
magx = weighted_proj.frb.data[('flash', 'magx')]
magz = weighted_proj.frb.data[('flash', 'magz')]
The output is all the same:
(Pdb) velx
ImageArray([[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
...,
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914],
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914],
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914]]) code_length/code_time
(Pdb) velz
ImageArray([[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
...,
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914],
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914],
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914]]) code_length/code_time
(Pdb) magx
ImageArray([[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
...,
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914],
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914],
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914]]) code_magnetic
(Pdb) magz
ImageArray([[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
[ 33142.74880205, 33142.74880205, 33142.74880205, ...,
33175.42774805, 33175.42774805, 33175.42774805],
...,
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914],
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914],
[-33143.85074608, -33143.85074608, -33143.85074608, ...,
-33172.57495914, -33172.57495914, -33172.57495914]]) code_magnetic
I mean, it gives back the correct units, but the array values are all identical between the different fields.
More information about the yt-dev
mailing list