The unique identifier of a target in the BDNYC database is its U-number. U-numbers are (almost) completely randomly assigned, and so there is no way of knowing a target's U-number a priori. Kelle's Access database is the only place where you can get a target's U-number... until now.
The method find_unum in the BDNYC database is a quick way to find the U-number of a target. The method, of course, can be used only for targets that already exist in the database.
How you can use find_unum
You can find a U-number by right ascension (ra), declination, and/or any known name. The method gives you the flexibility to enter only one of these if you prefer, and it will print in your terminal the attributes of all targets matching your input.
Let's look at an example. You need to find the U-number of a target with ra = 10 11 00.2. This is how you do it:
> bdnyc.find_unum(ra='10 11 00.2')
The output will be:
-----Potential match 1: -----
['name', 'TVLM 263-71765']
['ra', '10 11 00.2']
['dec', '+42 45 03']
Alternatively, instead of '10 11 00.2', you could enter '10 11', and the method will you give back all targets that have ra starting with '10 11'.
If you prefer to get the method's output not as a terminal print-out but as an object, then set the parameter dump as True. The output will be a Python list.
This is the complete method:
bdnyc.find_unum(ra=None, dec=None, name=None, dump=False)