pynmrstar 3.3.4__tar.gz → 3.3.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pynmrstar might be problematic. Click here for more details.
- {pynmrstar-3.3.4/pynmrstar.egg-info → pynmrstar-3.3.5}/PKG-INFO +2 -2
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/_internal.py +1 -1
- {pynmrstar-3.3.4 → pynmrstar-3.3.5/pynmrstar.egg-info}/PKG-INFO +2 -2
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar.egg-info/SOURCES.txt +0 -2
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/setup.py +1 -1
- pynmrstar-3.3.4/MANIFEST.in +0 -1
- pynmrstar-3.3.4/pynmrstar/remove_non_nef_data.py +0 -180
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/LICENSE +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/README.rst +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/c/cnmrstarmodule.c +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/__init__.py +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/definitions.py +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/entry.py +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/exceptions.py +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/loop.py +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/parser.py +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/reference_files/comments.str +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/reference_files/data_types.csv +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/reference_files/schema.csv +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/saveframe.py +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/schema.py +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar/utils.py +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar.egg-info/dependency_links.txt +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar.egg-info/requires.txt +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/pynmrstar.egg-info/top_level.txt +0 -0
- {pynmrstar-3.3.4 → pynmrstar-3.3.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pynmrstar
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.5
|
|
4
4
|
Summary: PyNMR-STAR provides tools for reading, writing, modifying, and interacting with NMR-STAR files. Maintained by the BMRB.
|
|
5
5
|
Home-page: https://github.com/uwbmrb/PyNMRSTAR
|
|
6
6
|
Author: Jon Wedell
|
|
@@ -10,12 +10,12 @@ Keywords: bmrb,parser,nmr,nmrstar,biomagresbank,biological magnetic resonance ba
|
|
|
10
10
|
Classifier: Development Status :: 6 - Mature
|
|
11
11
|
Classifier: Environment :: Console
|
|
12
12
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.8
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Intended Audience :: Developers
|
|
20
20
|
Classifier: License :: OSI Approved :: MIT License
|
|
21
21
|
Classifier: Natural Language :: English
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pynmrstar
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.5
|
|
4
4
|
Summary: PyNMR-STAR provides tools for reading, writing, modifying, and interacting with NMR-STAR files. Maintained by the BMRB.
|
|
5
5
|
Home-page: https://github.com/uwbmrb/PyNMRSTAR
|
|
6
6
|
Author: Jon Wedell
|
|
@@ -10,12 +10,12 @@ Keywords: bmrb,parser,nmr,nmrstar,biomagresbank,biological magnetic resonance ba
|
|
|
10
10
|
Classifier: Development Status :: 6 - Mature
|
|
11
11
|
Classifier: Environment :: Console
|
|
12
12
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.8
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Intended Audience :: Developers
|
|
20
20
|
Classifier: License :: OSI Approved :: MIT License
|
|
21
21
|
Classifier: Natural Language :: English
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
LICENSE
|
|
2
|
-
MANIFEST.in
|
|
3
2
|
README.rst
|
|
4
3
|
setup.py
|
|
5
4
|
c/cnmrstarmodule.c
|
|
@@ -10,7 +9,6 @@ pynmrstar/entry.py
|
|
|
10
9
|
pynmrstar/exceptions.py
|
|
11
10
|
pynmrstar/loop.py
|
|
12
11
|
pynmrstar/parser.py
|
|
13
|
-
pynmrstar/remove_non_nef_data.py
|
|
14
12
|
pynmrstar/saveframe.py
|
|
15
13
|
pynmrstar/schema.py
|
|
16
14
|
pynmrstar/utils.py
|
|
@@ -46,12 +46,12 @@ setup(name='pynmrstar',
|
|
|
46
46
|
'Development Status :: 6 - Mature',
|
|
47
47
|
'Environment :: Console',
|
|
48
48
|
'Programming Language :: Python :: 3 :: Only',
|
|
49
|
-
'Programming Language :: Python :: 3.7',
|
|
50
49
|
'Programming Language :: Python :: 3.8',
|
|
51
50
|
'Programming Language :: Python :: 3.9',
|
|
52
51
|
'Programming Language :: Python :: 3.10',
|
|
53
52
|
'Programming Language :: Python :: 3.11',
|
|
54
53
|
'Programming Language :: Python :: 3.12',
|
|
54
|
+
'Programming Language :: Python :: 3.13',
|
|
55
55
|
'Intended Audience :: Developers',
|
|
56
56
|
'License :: OSI Approved :: MIT License',
|
|
57
57
|
'Natural Language :: English',
|
pynmrstar-3.3.4/MANIFEST.in
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#recursive-include pynmrstar/unit_tests *
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
|
|
3
|
-
import pynmrstar
|
|
4
|
-
import logging
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def remove_software_specific_data(nef_file):
|
|
8
|
-
nef_tags = ['nef_nmr_meta_data', 'nef_molecular_system', 'nef_chemical_shift_list', 'nef_distance_restraint_list',
|
|
9
|
-
'nef_dihedral_restraint_list', 'nef_rdc_restraint_list', 'nef_nmr_spectrum', 'nef_peak_restraint_links',
|
|
10
|
-
'nef_related_entries', 'nef_program_script', 'nef_run_history', 'nef_sequence', 'nef_covalent_links',
|
|
11
|
-
'nef_chemical_shift', 'nef_distance_restraint', 'nef_dihedral_restraint', 'nef_rdc_restraint',
|
|
12
|
-
'nef_spectrum_dimension', 'nef_spectrum_dimension_transfer', 'nef_peak', 'nef_peak_restraint_link',
|
|
13
|
-
'audit', '_nef_program_script.program_name', '_nef_program_script.script_name',
|
|
14
|
-
'_nef_program_script.script',
|
|
15
|
-
'_nef_run_history.run_number', '_nef_run_history.program_name', '_nef_run_history.program_version',
|
|
16
|
-
'_nef_run_history.script_name', '_nef_run_history.script', '_nef_nmr_meta_data.sf_category',
|
|
17
|
-
'_nef_nmr_meta_data.sf_framecode', '_nef_nmr_meta_data.format_name',
|
|
18
|
-
'_nef_nmr_meta_data.format_version',
|
|
19
|
-
'_nef_nmr_meta_data.program_name', '_nef_nmr_meta_data.program_version',
|
|
20
|
-
'_nef_nmr_meta_data.creation_date',
|
|
21
|
-
'_nef_nmr_meta_data.uuid', '_nef_nmr_meta_data.coordinate_file_name',
|
|
22
|
-
'_nef_related_entries.database_name',
|
|
23
|
-
'_nef_related_entries.database_accession_code', '_nef_molecular_system.sf_category',
|
|
24
|
-
'_nef_molecular_system.sf_framecode', '_nef_sequence.index', '_nef_sequence.chain_code',
|
|
25
|
-
'_nef_sequence.sequence_code', '_nef_sequence.residue_name', '_nef_sequence.linking',
|
|
26
|
-
'_nef_sequence.residue_variant', '_nef_sequence.cis_peptide', '_nef_covalent_links.chain_code_1',
|
|
27
|
-
'_nef_covalent_links.sequence_code_1', '_nef_covalent_links.residue_name_1',
|
|
28
|
-
'_nef_covalent_links.atom_name_1', '_nef_covalent_links.chain_code_2',
|
|
29
|
-
'_nef_covalent_links.sequence_code_2',
|
|
30
|
-
'_nef_covalent_links.residue_name_2', '_nef_covalent_links.atom_name_2',
|
|
31
|
-
'_nef_chemical_shift_list.sf_category', '_nef_chemical_shift_list.sf_framecode',
|
|
32
|
-
'_nef_chemical_shift_list.atom_chemical_shift_units', '_nef_chemical_shift.chain_code',
|
|
33
|
-
'_nef_chemical_shift.sequence_code', '_nef_chemical_shift.residue_name',
|
|
34
|
-
'_nef_chemical_shift.atom_name', '_nef_chemical_shift.element', '_nef_chemical_shift.isotope_number',
|
|
35
|
-
'_nef_chemical_shift.value', '_nef_chemical_shift.value_uncertainty',
|
|
36
|
-
'_nef_distance_restraint_list.sf_category', '_nef_distance_restraint_list.sf_framecode',
|
|
37
|
-
'_nef_distance_restraint_list.potential_type', '_nef_distance_restraint_list.restraint_origin',
|
|
38
|
-
'_nef_distance_restraint.index', '_nef_distance_restraint.restraint_id',
|
|
39
|
-
'_nef_distance_restraint.restraint_combination_id', '_nef_distance_restraint.chain_code_1',
|
|
40
|
-
'_nef_distance_restraint.sequence_code_1', '_nef_distance_restraint.residue_name_1',
|
|
41
|
-
'_nef_distance_restraint.atom_name_1', '_nef_distance_restraint.chain_code_2',
|
|
42
|
-
'_nef_distance_restraint.sequence_code_2', '_nef_distance_restraint.residue_name_2',
|
|
43
|
-
'_nef_distance_restraint.atom_name_2', '_nef_distance_restraint.weight',
|
|
44
|
-
'_nef_distance_restraint.target_value', '_nef_distance_restraint.target_value',
|
|
45
|
-
'_nef_distance_restraint.target_value_uncertainty', '_nef_distance_restraint.lower_linear_limit',
|
|
46
|
-
'_nef_distance_restraint.lower_limit', '_nef_distance_restraint.upper_limit',
|
|
47
|
-
'_nef_distance_restraint.upper_linear_limit', '_nef_dihedral_restraint_list.sf_category',
|
|
48
|
-
'_nef_dihedral_restraint_list.sf_framecode', '_nef_dihedral_restraint_list.potential_type',
|
|
49
|
-
'_nef_dihedral_restraint_list.restraint_origin', '_nef_dihedral_restraint.index',
|
|
50
|
-
'_nef_dihedral_restraint.restraint_id', '_nef_dihedral_restraint.restraint_combination_id',
|
|
51
|
-
'_nef_dihedral_restraint.chain_code_1', '_nef_dihedral_restraint.sequence_code_1',
|
|
52
|
-
'_nef_dihedral_restraint.residue_name_1', '_nef_dihedral_restraint.atom_name_1',
|
|
53
|
-
'_nef_dihedral_restraint.chain_code_2', '_nef_dihedral_restraint.sequence_code_2',
|
|
54
|
-
'_nef_dihedral_restraint.residue_name_2', '_nef_dihedral_restraint.atom_name_2',
|
|
55
|
-
'_nef_dihedral_restraint.chain_code_3', '_nef_dihedral_restraint.sequence_code_3',
|
|
56
|
-
'_nef_dihedral_restraint.residue_name_3', '_nef_dihedral_restraint.atom_name_3',
|
|
57
|
-
'_nef_dihedral_restraint.chain_code_4', '_nef_dihedral_restraint.sequence_code_4',
|
|
58
|
-
'_nef_dihedral_restraint.residue_name_4', '_nef_dihedral_restraint.atom_name_4',
|
|
59
|
-
'_nef_dihedral_restraint.weight', '_nef_dihedral_restraint.target_value',
|
|
60
|
-
'_nef_dihedral_restraint.target_value_uncertainty', '_nef_dihedral_restraint.lower_linear_limit',
|
|
61
|
-
'_nef_dihedral_restraint.lower_limit', '_nef_dihedral_restraint.upper_limit',
|
|
62
|
-
'_nef_dihedral_restraint.upper_linear_limit', '_nef_dihedral_restraint.name',
|
|
63
|
-
'_nef_rdc_restraint_list.sf_category', '_nef_rdc_restraint_list.sf_framecode',
|
|
64
|
-
'_nef_rdc_restraint_list.potential_type', '_nef_rdc_restraint_list.restraint_origin',
|
|
65
|
-
'_nef_rdc_restraint_list.tensor_magnitude', '_nef_rdc_restraint_list.tensor_rhombicity',
|
|
66
|
-
'_nef_rdc_restraint_list.tensor_chain_code', '_nef_rdc_restraint_list.tensor_sequence_code',
|
|
67
|
-
'_nef_rdc_restraint_list.tensor_residue_name', '_nef_rdc_restraint.index',
|
|
68
|
-
'_nef_rdc_restraint.restraint_id', '_nef_rdc_restraint.restraint_combination_id',
|
|
69
|
-
'_nef_rdc_restraint.chain_code_1', '_nef_rdc_restraint.sequence_code_1',
|
|
70
|
-
'_nef_rdc_restraint.residue_name_1', '_nef_rdc_restraint.atom_name_1',
|
|
71
|
-
'_nef_rdc_restraint.chain_code_2', '_nef_rdc_restraint.sequence_code_2',
|
|
72
|
-
'_nef_rdc_restraint.residue_name_2', '_nef_rdc_restraint.atom_name_2',
|
|
73
|
-
'_nef_rdc_restraint.weight', '_nef_rdc_restraint.target_value',
|
|
74
|
-
'_nef_rdc_restraint.target_value', '_nef_rdc_restraint.target_value_uncertainty',
|
|
75
|
-
'_nef_rdc_restraint.target_value_uncertainty', '_nef_rdc_restraint.lower_linear_limit',
|
|
76
|
-
'_nef_rdc_restraint.lower_limit', '_nef_rdc_restraint.upper_limit',
|
|
77
|
-
'_nef_rdc_restraint.upper_linear_limit', '_nef_rdc_restraint.scale',
|
|
78
|
-
'_nef_rdc_restraint.distance_dependent', '_nef_nmr_spectrum.sf_category',
|
|
79
|
-
'_nef_nmr_spectrum.sf_framecode', '_nef_nmr_spectrum.num_dimensions',
|
|
80
|
-
'_nef_nmr_spectrum.chemical_shift_list', '_nef_nmr_spectrum.experiment_classification',
|
|
81
|
-
'_nef_nmr_spectrum.experiment_type', '_nef_spectrum_dimension.dimension_id',
|
|
82
|
-
'_nef_spectrum_dimension.axis_unit', '_nef_spectrum_dimension.axis_code',
|
|
83
|
-
'_nef_spectrum_dimension.spectrometer_frequency', '_nef_spectrum_dimension.spectral_width',
|
|
84
|
-
'_nef_spectrum_dimension.value_first_point', '_nef_spectrum_dimension.folding',
|
|
85
|
-
'_nef_spectrum_dimension.absolute_peak_positions', '_nef_spectrum_dimension.is_acquisition',
|
|
86
|
-
'_nef_spectrum_dimension_transfer.dimension_1', '_nef_spectrum_dimension_transfer.dimension_2',
|
|
87
|
-
'_nef_spectrum_dimension_transfer.transfer_type', '_nef_spectrum_dimension_transfer.is_indirect',
|
|
88
|
-
'_nef_peak.index', '_nef_peak.peak_id', '_nef_peak.volume',
|
|
89
|
-
'_nef_peak.volume_uncertainty', '_nef_peak.height', '_nef_peak.height_uncertainty',
|
|
90
|
-
'_nef_peak.position_1', '_nef_peak.position_uncertainty_1', '_nef_peak.position_2',
|
|
91
|
-
'_nef_peak.position_uncertainty_2', '_nef_peak.position_3', '_nef_peak.position_uncertainty_3',
|
|
92
|
-
'_nef_peak.position_4', '_nef_peak.position_uncertainty_4', '_nef_peak.position_5',
|
|
93
|
-
'_nef_peak.position_uncertainty_5', '_nef_peak.position_6', '_nef_peak.position_uncertainty_6',
|
|
94
|
-
'_nef_peak.position_7', '_nef_peak.position_uncertainty_7', '_nef_peak.position_8',
|
|
95
|
-
'_nef_peak.position_uncertainty_8', '_nef_peak.position_9', '_nef_peak.position_uncertainty_9',
|
|
96
|
-
'_nef_peak.position_10', '_nef_peak.position_uncertainty_10', '_nef_peak.position_11',
|
|
97
|
-
'_nef_peak.position_uncertainty_11', '_nef_peak.position_12', '_nef_peak.position_uncertainty_12',
|
|
98
|
-
'_nef_peak.position_13', '_nef_peak.position_uncertainty_13', '_nef_peak.position_14',
|
|
99
|
-
'_nef_peak.position_uncertainty_14', '_nef_peak.position_15', '_nef_peak.position_uncertainty_15',
|
|
100
|
-
'_nef_peak.chain_code_1', '_nef_peak.sequence_code_1', '_nef_peak.residue_name_1',
|
|
101
|
-
'_nef_peak.atom_name_1', '_nef_peak.chain_code_2', '_nef_peak.sequence_code_2',
|
|
102
|
-
'_nef_peak.residue_name_2',
|
|
103
|
-
'_nef_peak.atom_name_2', '_nef_peak.chain_code_3', '_nef_peak.sequence_code_3',
|
|
104
|
-
'_nef_peak.residue_name_3',
|
|
105
|
-
'_nef_peak.atom_name_3', '_nef_peak.chain_code_4', '_nef_peak.sequence_code_4',
|
|
106
|
-
'_nef_peak.residue_name_4',
|
|
107
|
-
'_nef_peak.atom_name_4', '_nef_peak.chain_code_5', '_nef_peak.sequence_code_5',
|
|
108
|
-
'_nef_peak.residue_name_5',
|
|
109
|
-
'_nef_peak.atom_name_5', '_nef_peak.chain_code_6', '_nef_peak.sequence_code_6',
|
|
110
|
-
'_nef_peak.residue_name_6',
|
|
111
|
-
'_nef_peak.atom_name_6', '_nef_peak.chain_code_7', '_nef_peak.sequence_code_7',
|
|
112
|
-
'_nef_peak.residue_name_7',
|
|
113
|
-
'_nef_peak.atom_name_7', '_nef_peak.chain_code_8', '_nef_peak.sequence_code_8',
|
|
114
|
-
'_nef_peak.residue_name_8',
|
|
115
|
-
'_nef_peak.atom_name_8', '_nef_peak.chain_code_9', '_nef_peak.sequence_code_9',
|
|
116
|
-
'_nef_peak.residue_name_9',
|
|
117
|
-
'_nef_peak.atom_name_9', '_nef_peak.chain_code_10', '_nef_peak.sequence_code_10',
|
|
118
|
-
'_nef_peak.residue_name_10',
|
|
119
|
-
'_nef_peak.atom_name_10', '_nef_peak.chain_code_11', '_nef_peak.sequence_code_11',
|
|
120
|
-
'_nef_peak.residue_name_11',
|
|
121
|
-
'_nef_peak.atom_name_11', '_nef_peak.chain_code_12', '_nef_peak.sequence_code_12',
|
|
122
|
-
'_nef_peak.residue_name_12',
|
|
123
|
-
'_nef_peak.atom_name_12', '_nef_peak.chain_code_13', '_nef_peak.sequence_code_13',
|
|
124
|
-
'_nef_peak.residue_name_13',
|
|
125
|
-
'_nef_peak.atom_name_13', '_nef_peak.chain_code_14', '_nef_peak.sequence_code_14',
|
|
126
|
-
'_nef_peak.residue_name_14',
|
|
127
|
-
'_nef_peak.atom_name_14', '_nef_peak.chain_code_15', '_nef_peak.sequence_code_15',
|
|
128
|
-
'_nef_peak.residue_name_15',
|
|
129
|
-
'_nef_peak.atom_name_15', '_nef_peak_restraint_links.sf_category',
|
|
130
|
-
'_nef_peak_restraint_links.sf_framecode',
|
|
131
|
-
'_nef_peak_restraint_link.nmr_spectrum_id', '_nef_peak_restraint_link.peak_id',
|
|
132
|
-
'_nef_peak_restraint_link.restraint_list_id', '_nef_peak_restraint_link.restraint_id',
|
|
133
|
-
'_audit.revision_id', '_audit.creation_date', '_audit.creation_method', '_audit.update_record']
|
|
134
|
-
|
|
135
|
-
# Suppress the parse notices, but then log everything after
|
|
136
|
-
logger = logging.getLogger('remove_non_nef_data')
|
|
137
|
-
logger.setLevel(logging.ERROR)
|
|
138
|
-
nef_data = pynmrstar.Entry.from_file(nef_file)
|
|
139
|
-
logger.setLevel(logging.DEBUG)
|
|
140
|
-
|
|
141
|
-
saveframe_index = 0
|
|
142
|
-
while saveframe_index < len(nef_data):
|
|
143
|
-
saveframe = nef_data[saveframe_index]
|
|
144
|
-
if not saveframe.category.lower().startswith('nef_'):
|
|
145
|
-
nef_data.remove_saveframe(saveframe)
|
|
146
|
-
logger.debug('Deleted entire saveframe: %s', saveframe.category)
|
|
147
|
-
continue
|
|
148
|
-
|
|
149
|
-
tags_to_remove = []
|
|
150
|
-
for tag in saveframe.tags:
|
|
151
|
-
if f'_{saveframe.category}.{tag[0]}'.lower() not in nef_tags:
|
|
152
|
-
tags_to_remove.append(tag)
|
|
153
|
-
saveframe.remove_tag(tags_to_remove)
|
|
154
|
-
logger.debug('Deleted saveframe tags: %s', tags_to_remove)
|
|
155
|
-
|
|
156
|
-
loop_index = 0
|
|
157
|
-
while loop_index < len(saveframe):
|
|
158
|
-
loop = saveframe[loop_index]
|
|
159
|
-
if not loop.category.lower().startswith('_nef'):
|
|
160
|
-
del (saveframe[loop_index])
|
|
161
|
-
logger.debug('Deleted entire loop: %s', loop.category)
|
|
162
|
-
continue
|
|
163
|
-
else:
|
|
164
|
-
for tag in loop.get_tag_names():
|
|
165
|
-
if tag.lower() not in nef_tags:
|
|
166
|
-
logger.debug('Deleted loop tag: %s', tag)
|
|
167
|
-
loop.remove_tag(tag)
|
|
168
|
-
loop_index += 1
|
|
169
|
-
saveframe_index += 1
|
|
170
|
-
|
|
171
|
-
logger.debug('Finished removing saveframes/loops/tags.')
|
|
172
|
-
nef_data.remove_empty_saveframes()
|
|
173
|
-
out_file = 'cleaned.nef'
|
|
174
|
-
with open(out_file, 'w') as wstarfile:
|
|
175
|
-
wstarfile.write(str(nef_data))
|
|
176
|
-
return True
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if __name__ == "__main__":
|
|
180
|
-
remove_software_specific_data('gp78CnewHOME15_test.nef')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|