@@ -54,6 +54,35 @@ def test_load_cis_data(self):
5454 self .assertTrue (data_exists ('N_p__C1_PP_CIS' ))
5555 self .assertTrue ('N_p__C1_PP_CIS' in cis_vars )
5656
57+ def test_codif_2dslices (self ):
58+ del_data ('*' )
59+ trange = ['2002-04-18 12:00:00' , '2002-04-18 18:00:00' ]
60+ event = '2002-04-18 17:30:03'
61+ probe = '1'
62+ pyspedas .projects .cluster .cis (trange , probe = probe , option = 'psd_h1' , get_support_data = True )
63+ pyspedas .projects .cluster .cis (trange , probe = probe , varformat = 'V_p_xyz_gse__C1_PP_CIS' )
64+ pyspedas .projects .cluster .fgm (trange , probe = probe , datatype = 'cp' )
65+ pyspedas .tplot_names ()
66+ xmd = pyspedas .get_data ('ions_3d__C1_CP_CIS_CODIF_HS_H1_PSD' , metadata = True )
67+ xmd #['CDF']['VATT']
68+ dist = pyspedas .projects .cluster .cluster_get_codif_dist ('ions_3d__C1_CP_CIS_CODIF_HS_H1_PSD' , probe )
69+
70+ slice_xy = pyspedas .slice2d (dist , time = event , rotation = 'xy' , interpolation = '2d' )
71+ slice_xz = pyspedas .slice2d (dist , time = event , rotation = 'xz' , interpolation = '2d' )
72+ slice_yz = pyspedas .slice2d (dist , time = event , rotation = 'yz' , interpolation = '2d' )
73+
74+ pyspedas .slice2d_plot (slice_xy , display = False , save_png = 'cluster_codif_slice_xy.png' )
75+ pyspedas .slice2d_plot (slice_xz , display = False , save_png = 'cluster_codif_slice_xz.png' )
76+ pyspedas .slice2d_plot (slice_yz , display = False , save_png = 'cluster_codif_slice_yz.png' )
77+
78+ the_slice = pyspedas .slice2d (dist , time = event , rotation = 'bv' , mag_data = 'B_vec_xyz_gse__C1_CP_FGM_SPIN' ,
79+ vel_data = 'V_p_xyz_gse__C1_PP_CIS' )
80+ pyspedas .slice2d_plot (the_slice , display = False , save_png = 'cluster_codif_slice_slice_bv_geo.png' )
81+
82+ the_slice = pyspedas .slice2d (dist , time = event , rotation = 'bv' , interpolation = '2d' ,
83+ mag_data = 'B_vec_xyz_gse__C1_CP_FGM_SPIN' , vel_data = 'V_p_xyz_gse__C1_PP_CIS' )
84+ pyspedas .slice2d_plot (the_slice , display = False , save_png = 'cluster_codif_slice_bv_2dinterp.png' )
85+
5786 def test_load_dwp_data (self ):
5887 del_data ('*' )
5988 dwp_vars = pyspedas .projects .cluster .dwp ()
0 commit comments