def test_get_critical_points_d(self): res_d = vod.get_critical_points(self.VF1_nomask, kind='gam_vort', mirroring=[['x', 0.]]) # imtio.export_to_file(res_d, "VF1_get_dritical_points_d.cimt") res_d2 = imtio.import_from_file("VF1_get_dritical_points_d.cimt") assert len(res_d2.foc) > 0 assert res_d == res_d2
def test_get_critical_points_h(self): res_h = vod.get_critical_points(self.VF1_nomask, kind='pbi_crit', smoothing_size=2) # imtio.export_to_file(res_h, "VF1_get_hritical_points_h.cimt") res_h2 = imtio.import_from_file("VF1_get_hritical_points_h.cimt") assert len(res_h2.foc) > 0 assert res_h == res_h2
def test_get_critical_points_c(self): res_c = vod.get_critical_points(self.TVF1_nomask, kind='gam_vort', thread='all') # imtio.export_to_file(res_c, "VF1_get_critical_points_c.cimt") res_c2 = imtio.import_from_file("VF1_get_critical_points_c.cimt") assert len(res_c2.foc) > 0 assert res_c == res_c2
def test_get_critical_points_g(self): res_g = vod.get_critical_points(self.TVF1_nomask, kind='pbi_crit', thread='all') # imtio.export_to_file(res_g, "VF1_get_gritical_points_g.cimt") res_g2 = imtio.import_from_file("VF1_get_gritical_points_g.cimt") assert len(res_g2.foc) > 0 assert res_g == res_g2
def test_get_critical_points_f(self): res_f = vod.get_critical_points(self.VF1_nomask, kind='pbi_cell', mirroring=[['x', 0.]]) # imtio.export_to_file(res_f, "VF1_get_fritical_points_f.cimt") res_f2 = imtio.import_from_file("VF1_get_fritical_points_f.cimt") assert len(res_f2.foc) > 0 assert res_f == res_f2
def test_get_critical_points_a(self): res_a = vod.get_critical_points(self.VF1_nomask, mirroring=[['x', 0.]], thread='all') # imtio.export_to_file(res_a, "VF1_get_critical_points_a.cimt") res_a2 = imtio.import_from_file("VF1_get_critical_points_a.cimt") assert len(res_a2.foc) > 0 assert res_a == res_a2
def test_get_mean_trajectory(self): cps = vod.get_critical_points(self.TVF1_nomask, kind='pbi_crit', thread='all') cps.compute_traj() means = cps.get_mean_trajectory("foc", min_len=0, min_nmb_to_avg=0) # imtio.export_to_file(means, "VF1_get_mean_trajectory_a.cimt") means_2 = imtio.import_from_file("VF1_get_mean_trajectory_a.cimt") assert means == means_2
def test_break_trajectories(self): cps = vod.get_critical_points(self.TVF1_nomask, kind='pbi_crit', thread='all') cps.compute_traj() cps.break_trajectories() # imtio.export_to_file(cps, "VF1_break_trajectories_a.cimt") cps_2 = imtio.import_from_file("VF1_break_trajectories_a.cimt") assert cps == cps_2
def test_get_point_density(self): cps = vod.get_critical_points(self.TVF1_nomask, kind='pbi_crit', thread='all') # dens = cps.get_points_density('foc') # imtio.export_to_file(dens, "VF1_get_points_density_a.cimt") dens_2 = imtio.import_from_file("VF1_get_points_density_a.cimt") assert dens == dens_2
def test_compute_traj(self): res_g = vod.get_critical_points(self.TVF1_nomask, kind='pbi_crit', thread='all') # res_g.compute_traj() # imtio.export_to_file(res_g, "VF1_compute_traj1_g.cimt") res_g2 = imtio.import_from_file("VF1_compute_traj1_g.cimt") assert res_g == res_g2 # res_g.compute_traj(epsilon=4) # imtio.export_to_file(res_g, "VF1_compute_traj2_g.cimt") res_g2 = imtio.import_from_file("VF1_compute_traj2_g.cimt") assert res_g == res_g2 # res_g.compute_traj(epsilon=4*make_unit('m')) # imtio.export_to_file(res_g, "VF1_compute_traj3_g.cimt") res_g2 = imtio.import_from_file("VF1_compute_traj3_g.cimt") assert res_g == res_g2 # res_g.compute_traj(close_traj=True) # imtio.export_to_file(res_g, "VF1_compute_traj4_g.cimt") res_g2 = imtio.import_from_file("VF1_compute_traj4_g.cimt") assert res_g == res_g2
def test_get_critical_points_b(self): res_b = vod.get_critical_points(self.TVF1_nomask) # imtio.export_to_file(res_b, "VF1_get_critical_points_b.cimt") res_b2 = imtio.import_from_file("VF1_get_critical_points_b.cimt") assert len(res_b2.foc) > 0 assert res_b == res_b2
def test_get_critical_points_e(self): res_e = vod.get_critical_points(self.TVF1_nomask, kind='pbi_cell') # imtio.export_to_file(res_e, "VF1_get_eritical_points_e.cimt") res_e2 = imtio.import_from_file("VF1_get_eritical_points_e.cimt") assert len(res_e2.foc) > 0 assert res_e == res_e2