Changeset bec6cb8 in sasview
- Timestamp:
- Aug 19, 2016 7:21:53 AM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- d3e1870
- Parents:
- a14fa99
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/file_converter/converter_panel.py
r346d56e rbec6cb8 239 239 """ 240 240 valid_input = False 241 is_bsl = (self.data_type == 'bsl') 242 dlg = FrameSelectDialog(n_frames, is_bsl) 241 _, ext = os.path.splitext(self.output.GetPath()) 242 show_single_btn = (ext == '.h5') 243 dlg = FrameSelectDialog(n_frames, show_single_btn) 243 244 frames = None 244 245 increment = None … … 251 252 last_frame = int(dlg.last_input.GetValue()) 252 253 increment = int(dlg.increment_input.GetValue()) 253 if not is_bsl:254 if not show_single_btn: 254 255 single_file = dlg.single_btn.GetValue() 255 256 … … 338 339 setattr(datainfo, key, value) 339 340 340 self.convert_to_cansas(frame_data, output_path, single_file) 341 _, ext = os.path.splitext(output_path) 342 if ext == '.xml': 343 self.convert_to_cansas(frame_data, output_path, single_file) 344 else: # ext == '.h5' 345 w = NXcanSASWriter() 346 w.write(frame_data, output_path) 341 347 342 348 def on_convert(self, event): … … 471 477 self.radiation_input.Enable() 472 478 self.metadata_section.Enable() 473 self.output.SetWildcard("CanSAS 1D (*.xml)|*.xml ")479 self.output.SetWildcard("CanSAS 1D (*.xml)|*.xml|NXcanSAS HDF5 File (*.h5)|*.h5") 474 480 475 481 def radiationtype_changed(self, event): … … 560 566 561 567 self.output = FileInput(self, 562 wildcard="CanSAS 1D (*.xml)|*.xml ")568 wildcard="CanSAS 1D (*.xml)|*.xml|NXcanSAS HDF5 File (*.h5)|*.h5") 563 569 input_grid.Add(self.output.GetCtrl(), (y,1), (1,1), wx.EXPAND | wx.ALL, 5) 564 570 y += 1
Note: See TracChangeset
for help on using the changeset viewer.