@@ -444,96 +444,6 @@ def _flutter_prints(
444444 print (f"Altitude of minimum Safety Factor: { altitude_min_sf :.3f} m (AGL)\n " )
445445
446446
447- def create_dispersion_dictionary (filename ): # pragma: no cover
448- """Creates a dictionary with the rocket data provided by a .csv file.
449- File should be organized in four columns: attribute_class, parameter_name,
450- mean_value, standard_deviation. The first row should be the header.
451- It is advised to use ";" as separator, but "," should work on most of cases.
452- The "," separator might cause problems if the data set contains lists where
453- the items are separated by commas.
454-
455- Parameters
456- ----------
457- filename : string
458- String with the path to the .csv file. The file should follow the
459- following structure:
460-
461- .. code-block::
462-
463- attribute_class; parameter_name; mean_value; standard_deviation;
464-
465- environment; ensemble_member; [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];;
466-
467- motor; impulse; 1415.15; 35.3;
468-
469- motor; burn_time; 5.274; 1;
470-
471- motor; nozzle_radius; 0.021642; 0.0005;
472-
473- motor; throat_radius; 0.008; 0.0005;
474-
475- motor; grain_separation; 0.006; 0.001;
476-
477- motor; grain_density; 1707; 50;
478-
479- Returns
480- -------
481- dictionary
482- Dictionary with all rocket data to be used in dispersion analysis. The
483- dictionary will follow the following structure:
484-
485- .. code-block:: python
486-
487- analysis_parameters = {
488- 'environment': {
489- 'ensemble_member': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
490- },
491- 'motor': {
492- 'impulse': (1415.15, 35.3),
493- 'burn_time': (5.274, 1),
494- 'nozzle_radius': (0.021642, 0.0005),
495- 'throat_radius': (0.008, 0.0005),
496- 'grain_separation': (0.006, 0.001),
497- 'grain_density': (1707, 50),
498- }
499- }
500- """
501- warnings .warn (
502- "This function is deprecated and will be removed in v1.10.0." ,
503- DeprecationWarning ,
504- )
505- try :
506- file = np .genfromtxt (
507- filename , usecols = (1 , 2 , 3 ), skip_header = 1 , delimiter = ";" , dtype = str
508- )
509- except ValueError :
510- warnings .warn (
511- "Error caught: the recommended delimiter is ';'. If using ',' "
512- "instead, be aware that some resources might not work as "
513- "expected if your data set contains lists where the items are "
514- "separated by commas. Please consider changing the delimiter to "
515- "';' if that is the case."
516- )
517- warnings .warn (traceback .format_exc ())
518- file = np .genfromtxt (
519- filename , usecols = (1 , 2 , 3 ), skip_header = 1 , delimiter = "," , dtype = str
520- )
521- analysis_parameters = {}
522- for row in file :
523- if row [0 ] != "" :
524- if row [2 ] == "" :
525- try :
526- analysis_parameters [row [0 ].strip ()] = float (row [1 ])
527- except ValueError :
528- analysis_parameters [row [0 ].strip ()] = ast .literal_eval (row [1 ])
529- else :
530- try :
531- analysis_parameters [row [0 ].strip ()] = (float (row [1 ]), float (row [2 ]))
532- except ValueError :
533- analysis_parameters [row [0 ].strip ()] = ""
534- return analysis_parameters
535-
536-
537447def apogee_by_mass (flight , min_mass , max_mass , points = 10 , plot = True ):
538448 """Returns a Function object that estimates the apogee of a rocket given
539449 its mass (no motor). The function will use the rocket's mass as the
0 commit comments