Closed spacefan closed 1 week ago
You may need to use the dev version of the conda package to run this example (for now)
You may need to use the dev version of the conda package to run this example (for now)
Thanks for your fast and kind replay!
I'm updated tudatpy to 0.7.3.dev26
now, but another error exits:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[11], line 67
65 normal_mode = get_longitudinal_normal_mode_from_inertia_tensor(bodies.get('Phobos').inertia_tensor, mean_motion)
66 librations = bring_inside_bounds(dependents_array[:,8:10], -PI, PI, 'upper')
---> 67 lon_lib_freq, lon_lib_amp = get_fourier(np.hstack((np.atleast_2d(dependents_array[:,0]).T, np.atleast_2d(librations[:,1]).T)), [2.0*PI, 1])
68 lat_lib_freq, lat_lib_amp = get_fourier(np.hstack((np.atleast_2d(dependents_array[:,0]).T, np.atleast_2d(librations[:,0]).T)), [2.0*PI, 1])
69 plt.figure()
Cell In[4], line 219, in get_fourier(time_history, clean_signal)
217 if clean_signal[1] != 0:
218 coeffs = polyfit(sample_times, signal, clean_signal[1])
--> 219 for idx in len(coeffs):
220 current_coeff = coeffs[idx]
221 exponent = idx
TypeError: 'int' object is not iterable
Error corrected as fellows:
for idx in range(len(coeffs)):
But another... error exits:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[21], line 5
3 dissipation_times = list(np.array([4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0, 1024.0, 2048.0, 4096.0])*3600.0) # In seconds. Here, we
4 #"""
----> 5 damping_results = numerical_simulation.propagation.get_zero_proper_mode_rotational_state(bodies,
6 combined_propagator_settings,
7 phobos_mean_rotational_rate,
8 dissipation_times)
9 #"""
11 """
12 damping_results = numerical_simulation.propagation.get_damped_proper_mode_initial_rotational_state(bodies,
13 combined_propagator_settings,
14 phobos_mean_rotational_rate,
15 dissipation_times)
16 """
AttributeError: module 'tudatpy.kernel.numerical_simulation.propagation' has no attribute 'get_zero_proper_mode_rotational_state'
> dir(numerical_simulation.propagation)
['AccelerationModel',
'AerodynamicGuidance',
'ConstantThrustMagnitudeWrapper',
'CustomThrustMagnitudeWrapper',
'DependentVariablesInterface',
'HybridArcSimulationResults',
'HybridArcVariationalSimulationResults',
'MassRateModel',
'MultiArcSimulationResults',
'MultiArcVariationalSimulationResults',
'PropagationTerminationDetails',
'PropagationTerminationDetailsFromHybridCondition',
'PropagationTerminationReason',
'RotationalProperModeDampingResults',
'SimulationResults',
'SingleArcSimulationResults',
'SingleArcVariationalSimulationResults',
'ThrustMagnitudeWrapper',
'TorqueModel',
'__doc__',
'__loader__',
'__name__',
'__package__',
'__spec__',
'combine_initial_states',
'get_damped_proper_mode_initial_rotational_state',
'get_generalized_acceleration_size',
'get_initial_rotational_state_of_body',
'get_initial_state_of_bodies',
'get_initial_state_of_body',
'get_single_integration_differential_equation_order',
'get_single_integration_size',
'get_state_of_bodies',
'nan_or_inf_detected_in_state',
'propagation_never_run',
'runtime_error_caught_in_propagation',
'termination_condition_reached',
'unknown_reason']
Wrong version of tudat or tudatpy?
> conda list
tudat 2.12.1.dev25 h4dc84c1_0 tudat-team/label/dev
tudat-resources 2.1 h802ae32_2 tudat-team
tudatpy 0.7.3.dev26 py310hed3ccf5_1 tudat-team/label/dev
When i run
coupled_translational_rotational_dynamics.ipynb
in JupyterLab, everything works fine until Cell In[5]:When I commented out the code that reported the error, Cell In[10] reported another error:
Why
tudatpy.kernel.numerical_simulation.environment_setup.gravity_field.SphericalHarmonicsGravityFieldSe
object has no attributescaled_mean_moment_of_inertia
here? Please help!