跳到主要內容

發表文章

目前顯示的是有「python」標籤的文章

Using ObsPy to plot earthquake seismogram from HKO data

1. install PyWEED from anaconda command prompt. This will also install ObsPy 2. find a report  from HKO Earthquake  utilising ObsPy , you can run the FDSN web services 3, run the following simple python script (wait for 10 seconds or maybe more) example: 2022/01/21 16:00 ( UTC)  my python script is uploaded to gitlab , only broadband sensors are selected. btw, data is only available for date after 2009 note:  network: HK station: HKPS , intro from Dr Wong Wing Tak instrument list of HKPS three letters meaning; 1st letter : (response) V = Very Long Period H = High Broad Band B = Broad Band L = Long Period 2nd letter: (instrument) C = ? E = ? H = High gain seismometer K = ? M = mass position seismometer N =accelerometer 3rd letter:(orientation) Z = Vertical N = North-South E = East-West the time on HKO is in HKT(UTC+8), so you need to convert to UTC Streckeisen STS-2/Quanterra 330HR Linear Phase: Broadband Sensor, response from 120 seconds to about 10 Hz Episensor...

ASI camera programming via python-zwoasi in Linux

why? astroberry is totally usable on a PC, the UI has so many features, and the "up" and "down" buttons are simply too small to use on a smartphone, or a mini tablet. So I start to investigate on a simple command line, or a "lite" version of UI with big buttons I use raspberry pi and old ASI120 as an example 1a. install ASI_linux SDK 1b. copy python-zwoasi from github , or simply 'pip install zwoasi' 2. extract or install under /home/astroberry 3. for testing purpose, copy the zwoasi_demo.py to ASI lib/arm7 directory  4. edit the zwoasi_demo.py file and insert os.environ variable as below: 5. save with another filename, eg, zwoasi_demo1.py 6. in terminal, run 'python zwoasi_demo1.py'   first light photo: setting environment in python   Steven Marple's blog   how about FITS format? pyQt example

using TLE2Keplerian to convert for GMAT

the python script is on Gitlab This example uses Tian He core stage as example, NORAD id is 48275, so the TLE text file is named as 48275.txt 1. prepare a text file with 3 lines first line : TIANHE_CORE second and third line: TLE run "anaconda prompt" goto directory where the python script is located type 48275.txt | python TLE2Keplerian.py > out.txt the keplerian elements are now saved in the out.txt file. using myfirst.script as template, replace keplerian element lines with the data just generated  copy and paste the output into another text file, named as 48275.script these lines are kept the same every time: GMAT $$$$$.DateFormat = UTCGregorian; GMAT $$$$$.Epoch = '01 Jan 2000 11:59:28.000'; GMAT $$$$$.CoordinateSystem = EarthMJ2000Eq; GMAT $$$$$.DisplayStateType = Keplerian;  replace $$$$$ with name of your satellite run GMAT File >New >Mission File > Open>  myfirst_48275.script press the run button or press F5:  if everything is ok, you will th...

python - quick start

install using anaconda . - this will install NumPy SciPy and many other packages. It takes care of conflict management between packages, and environments. They claim to be better than pip I choose the individual package this will install python 3.7.6  check the version by "python --version" after install, verify your installations : Anaconda Navigator, or Anaconda Prompt type: conda list What's new in AstroPy  4.0 here comes the tricky part: install opencv 3.4.12 these doesn't work for me: conda install -c conda-forge opencv  conda install -c menpo opencv   openCV tutorial: morioh