Open andres-baquero opened 1 year ago
Dear @andres-baquero This issue is fixed and will be soon published on SORA v0.3.1. The error arises from the way SORA is reading the OBJ file. It expects only one space between numbers.
It follows a code snippet that can convert your OBJ file to one that SORA can read in v0.3.0.
def convert(input_file, output_file):
with open(input_file, 'r') as f:
lines = f.readlines()
with open(output_file, 'w') as f:
for l in lines:
f.write(' '.join(l.split()) + '\n')
convert('Tombecka.obj', 'Tombecka_2.obj')
Hi. I'm trying to fit an occultation chord to 3D shape model for Tombecka asteroid, but I'm getting this error "ValueError: could not convert string to float: " with the model.obj file. I'm using the code used in the example: https://sora.readthedocs.io/en/latest/examples/shape3d.html
import requests response = requests.get("https://3d-asteroids.space/data/asteroids/models/t/1013_Tombecka_2357.obj") open("Tombecka_Durech_48k_poly.obj", "wb").write(response.content)
from sora import Body tombecka = Body(name="Tombecka", shape="Tombecka_Durech_48k_poly.obj", ephem="horizons")
SORA version: 0.3 Obtaining data for Tombecka from SBDB
ValueErrorTraceback (most recent call last)