Questions tagged [pendulum]

Pendulum is a Python package to ease datetimes manipulation. It provides classes that are drop-in replacements for the native ones (they inherit from them).

67 questions
0
votes
1 answer

How do I create a timedelta with pendulum?

I'm looking for a way of creating an arbitrary timedelta compatible object with pendulum. Previously there was a pendulum.interval method but this seems to not exist in recent versions of pendulum. So say I'd like a delta of five minutes: surely…
maxcountryman
  • 1,562
  • 1
  • 24
  • 51
0
votes
1 answer

How to convert a python's datetime.tzinfo object to a pendulum's Timezone object?

I know I can convert a datetime.datetime to pendulums with from datetime import datetime,timezone import pendulum a = datetime(2021,6,1,tzinfo=timezone.utc) b = pendulum.instance(a) b.tzinfo.name # the presence of the attribute 'name' means it's a…
RubenLaguna
  • 21,435
  • 13
  • 113
  • 151
0
votes
0 answers

DateTime from Database (SqlAlchemy) not same timestamp like pendulum parsed date

I have pendulum parsed a date string: pendulum.parse('2015-03-09') This object is now stored to a SqlAlchemy database table (mysql) with Column(SqlAlchemy.DateTime) Now, I load this column value, its then: Now I want to compare it back with the…
Martin Fischer
  • 469
  • 1
  • 7
  • 21
0
votes
1 answer

Numerical solution for a pendulum

I am having a trouble in providing a graphical representation of my system, which happens to be a harmonically driven pendulum. The problem is shown below for reference. Problem The source code I used is shown below using the Verlet Scheme. #Import…
0
votes
1 answer

Adding a DC Motor to a Simscape Model

I want simulate an inverted pendulum via Simcape. For this, i created a Model with SolidWorks and tranformed it to Simscape. So far so good. Everything worked and my Simulation shows the predicted physical Behavior. But now i want to add a dc motor…
0
votes
1 answer

How can I animate a datafile in gnuplot?

I have a file with the coordinates (x1, y1), (x2, y2) of a double pendulum at an instant of time t. I would like to know how to animate this file. n t x y 1. 0. 0.3435957874318018 -0.36323812418181006 2. 0. 0.3490554835456995…
0
votes
1 answer

Google Cloud Composer DAG is not getting triggered

I'm scheduling a DAG to run at 04:00 AM, Tuesday through Saturday eastern standard time (NY) starting from today 2020/08/11. After writing up the code and deploying, I expected the DAG to get triggered. I refreshed my Airflow UI page a couple of…
comet
  • 65
  • 2
  • 8
0
votes
0 answers

Pendulum plot simulation Matplotlib - data from file

I have to create a pendulum simulation on plot. I have to read data from file, then only thing I have to solve is X and Y cords, what I did. It is specified that I am supposed to use "roll"/"pitch"/"yaw" columns and with one of them make a…
novacco
  • 9
  • 1
0
votes
1 answer

What week of the month is it?

pendulum v2.1.0 on macOS >>> import pendulum >>> d = pendulum.Date(2019, 12, 31) >>> d.week_of_month -46 Isn't new years day 2019 the week 5 of the month? How to interpret week of the month result negative 46?
COVFEFE-19
  • 293
  • 1
  • 8
0
votes
1 answer

Numerical Derivative in R?

I have generated some real data of the motion of a damping pendulum: I took its derivative in R by taking the difference of consecutive points and dividing by difference in time. There are 1202 data points in this picture. That gave this graph: I…
0
votes
0 answers

Problem with FuncAnimation to make a Matplotlib Pendulum Animation

The problem I am simulating is a simple pendulum. While I have done it before using PyGame I now decided to use matplotlib's animation tools. It is working but not with the desired effect. Simulating it in real time seems to be working. I have…
casiofx82
  • 26
  • 2
0
votes
1 answer

Can't create exe with pycharm as it complains pendulum locales

I have a GUI application that will not package to an exe with pyinstaller. When I run pyinstaller main.py --onefile --windowed I get the following error. Traceback (most recent call last): File "", line 2, in ModuleNotFoundError:…
Finchy70
  • 441
  • 9
  • 25
0
votes
1 answer

Why the pendulum in openai gym has cos and sin feature? why not just use one of them?

Why the pendulum has cos and sin feature? Can I just use 1 of them? Or can I use theta (the angle) instead? I expect some explanation for this XD, intuitive or theoretical ones are all welcome.
0
votes
0 answers

How to calculate angle from velocity of moving pivot (pendulum)?

I am trying to simulate pendulum with moving pivot in processing.js. My question is, how to calculate angle at which my pendulum swing (while pivot is moving), based on pivot velocity? I searched all the web, but there angle is always known in…
Arashii
  • 21
  • 2
0
votes
1 answer

Odd slowing effect on a double-pendulum animation with python tkinter

I am just getting started with python and tried to create a double-pendulum animation using tkinter. I am aware that because of my inexperience, I likely took a convoluted approach. I have an error that I did not expect. It seems that the pendulum…