NEO stands for near-Earth object. The Center for NEO Studies (CNEOS) defines NEOs as comets and asteroids that have been nudged by the gravitational attraction of nearby planets into orbits that allow them to enter the Earth’s neighborhood.

And what does “near” exactly mean? In terms of orbital elements, asteroids and comets can be considered NEOs if their perihelion (orbit point which is nearest to the Sun) is less than 1.3 au = 1.945 * 108 km from the Sun.

This module can also be used to get NEOs orbit, in the same way that neows, but it have some advantages (and some disadvantages).

It relies on DASTCOM5 database, a NASA/JPL maintained asteroid and comet database. This database has to be downloaded at least once in order to use this module. According to its README, it is updated typically a couple times per day, but potentially as frequently as once per hour, so you can download it whenever you want the more recently discovered bodies. This also means that, after downloading the file, you can use the database offline.

The file is a ~230 MB zip that you can manually download and unzip in ~/.poliastro or, more easily, you can use

dastcom5.download_dastcom5()

The main DASTCOM5 advantage over NeoWs is that you can use it to search not only NEOs, but any asteroid or comet. The easiest function is orbit_from_name():

Keep in mind that this function returns a list of orbits matching your string. This is made on purpose given that there are comets which have several records in the database (one for each orbit determination in history) what allow plots like this one:

While neows can only be used to get Orbit objects, dastcom5 can also provide asteroid and comet complete database. Once you have this, you can get specific data about one or more bodies. The complete databases are ndarrays, so if you want to know the entire list of available parameters, you can look at the dtype, and they are also explained in documentation API Reference:

[10]:

ast_db=dastcom5.asteroid_db()comet_db=dastcom5.comet_db()ast_db.dtype.names[:20]# They are more than 100, but that would be too much lines in this notebook :P

Asteroid and comet parameters are not exactly the same (although they are very close)

With these ndarrays you can classify asteroids and comets, sort them, get all their parameters, and whatever comes to your mind.

For example, NEOs can be grouped in several ways. One of the NEOs group is called Atiras, and is formed by NEOs whose orbits are contained entirely with the orbit of the Earth. They are a really little group, and we can try to plot all of these NEOs using asteroid_db():

Talking in orbital terms, Atiras have an aphelion distance, Q<0.983au and a semi-major axis, a<1.0au. Visiting documentation API Reference, you can see that DASTCOM5 provides semi-major axis, but doesn’t provide aphelion distance. You can get aphelion distance easily knowing perihelion distance (q, QR in DASTCOM5) and semi-major axis Q=2*a-q, but there are probably many other ways.

We knew beforehand that there are no Atira comets, only asteroids (comet orbits are usually more eccentric), but we could use the same method with com_db if we wanted.

Finally, another interesting function in dastcom5 is entire_db(), which is really similar to ast_db and com_db, but it returns a Pandasdataframe instead of a numpyndarray. The dataframe has asteroids and comets in it, but in order to achieve that (and a more manageable dataframe), a lot of parameters were removed, and others were renamed: