Open yeonjaej opened 1 year ago
configuration block can be updated as below.
cfg = """ iotool: batch_size: 1 shuffle: False num_workers: 4 collate_fn: CollateSparse dataset: name: LArCVDataset data_keys: - DATA_DIR/mpvmpr_062022_test_small.root limit_num_files: 10 schema: input_data: parser: parse_sparse3d args: sparse_event_list: - sparse3d_reco - sparse3d_reco_chi2 - sparse3d_reco_hit_charge0 - sparse3d_reco_hit_charge1 - sparse3d_reco_hit_charge2 - sparse3d_reco_hit_key0 - sparse3d_reco_hit_key1 - sparse3d_reco_hit_key2 segment_label: parser: parse_sparse3d args: sparse_event_list: - sparse3d_pcluster_semantics_ghost cluster_label: parser: parse_cluster3d args: cluster_event: cluster3d_pcluster particle_event: particle_pcluster sparse_semantics_event: sparse3d_pcluster_semantics add_particle_info: True type_include_mpr: false particles_label: parser: parse_particle_points args: sparse_event: sparse3d_pcluster particle_event: particle_corrected include_point_tagging: true kinematics_label: parser: parse_cluster3d args: cluster_event: cluster3d_pcluster particle_event: particle_corrected sparse_semantics_event: sparse3d_pcluster_semantics add_kinematics_info: true type_include_mpr: false particle_graph: parser: parse_particle_graph args: particle_event: particle_corrected cluster_event: cluster3d_pcluster particles_asis: parser: parse_particle_asis args: particle_event: particle_pcluster cluster_event: cluster3d_pcluster """.replace('DATA_DIR', DATA_DIR)
the index for entry is 0-th, not 3-th
clust_label = data['cluster_label'][data['cluster_label'][:, 3] == entry] input_data = data['input_data'][data['input_data'][:, 3] == entry] segment_label = data['segment_label'][data['segment_label'][:, 3] == entry, -1] particles_label = data['particles_label'][data['particles_label'][:, 3] == entry]
the above code block should be updated to
clust_label = data['cluster_label'][data['cluster_label'][:, 0] == entry] input_data = data['input_data'][data['input_data'][:, 0] == entry] segment_label = data['segment_label'][data['segment_label'][:, 0] == entry, -1] particles_label = data['particles_label'][data['particles_label'][:, 0] == entry]
configuration block can be updated as below.
the index for entry is 0-th, not 3-th
the above code block should be updated to