Why am I getting this error when trying to create an HR diagram: HTTPError: Error 500: Cannot invoke "java.util.List.iterator()" because "results" is null

When I am trying to create an HR diagram and when listing a new catalogue called teff_gspphot from Gaia, it returns me this unexpected error. Please see the picture attached below:

https://preview.redd.it/su9d8fwujsih1.png?width=2648&format=png&auto=webp&s=0f2146e57143f8b2aed73cc70d1d5a015d476673

reddit.com
u/More-Independent-132 — 9 days ago

что сложнее черчение или рисование?

Я бы хотел записаться на черчение, но не знаю насколько оно сложное и куда лучше записаться на рисование, 3Д рисование или все-таки черчение. Также, насколько был сложен предмет черчения, который был насколько я знаю стандартизирован в школах Советского Союза?

reddit.com
u/More-Independent-132 — 10 days ago

Что сложнее черчение или рисование?

Я бы хотел записаться на черчение, но не знаю насколько оно сложное и куда лучше записаться на рисование, 3Д рисование или все-таки черчение. Также, насколько был сложен предмет черчения, который был насколько я знаю стандартизирован в школах Советского Союза?

reddit.com
u/More-Independent-132 — 10 days ago

Invalid: syntax error for ...

I've tried to make an HR diagram of off the Github tutorial but when I've finally downloaded the file, it gives me an error. I am a beginner to Python. Here is the code from Github:

Read in the ASPCAP data

In this example, we will use the ASPCAP summary file, which contains observing details, stellar parameters, stellar abundances, and other data for 1,095,480 stars.

To download this file directly from the SAS, go to https://dr19.sdss.org/sas/dr19/spectro/astra/0.6.0/summary/astraAllStarASPCAP-0.6.0.fits.gz. Note this file is over 1 GB in size; if you prefer not to download such a large file, this notebook is available to run and interact with on SciServer

# Load in astra file

localpath 
=
 '/home/idies/workspace/sdss_sas/dr19/spectro/astra/0.6.0/summary/'
fname 
=
 'astraAllStarASPCAP-0.6.0.fits.gz'

aspcap 
=
 Table
.
read(localpath
+
fname, format
=
'fits', hdu
=
2)
print('astraAllStarASPCAP contains %d stars' 
%
 len(aspcap))

My code:

# Load in astra file

localpath = Users/idk/Downloads/astraAllStarASPCAP-0.6.0.fits.gz

fname = 'astraAllStarASPCAP-0.6.0.fits.gz'

aspcap = Table.read(localpath+fname, format='fits', hdu=2)

print('astraAllStarASPCAP contains %d stars' % len(aspcap))

Error:

 Cell In[8], line 3
    localpath = Users/idk/Downloads/astraAllStarASPCAP-0.6.0.fits.gz
                                                          ^
SyntaxError: invalid syntax

What do I do?

reddit.com
u/More-Independent-132 — 13 days ago

How to plot a colour-coded HR Diagram by spectral type

So, I want to create an HR Diagram for each spectral type, selecting one star from each spectral type (O, B, A, F, G, K, M). I got all the data I need from SIMBAD like parallaxes of each star, the B-V out of which I got the spectral types of each star. But, how do I plot it using Gaia in Python and also change the colour of each spectral type to make a distinction. I have created an HR Diagram below using this code, but what do I do when it comes to plotting an HR Diagram for specific stars, do I just include ra and dec of a specific star from Gaia into the job query or what and how do I combine all the stars to accommodate the whole HR Diagram? And how do I calculate the absolute magnitude, what distance do I include? of the parallax? Here's the code itself:

Query for Gaia's Catalogue of Nearby Stars within 25 parsecs from the Sun In the Gaia archive it lives in external.gaiaedr3_gcns_main_1 in the Gaia archive

[5]

5 мин.

job = Gaia.launch_job_async(" SELECT source_id, ra, parallax, dec, phot_g_mean_mag, phot_bp_mean_mag, phot_rp_mean_mag \
                            FROM external.gaiaedr3_gcns_main_1 \
                            WHERE parallax>50")

gtable = job.get_results()



INFO:astroquery:Query finished.
 INFO: Query finished. [astroquery.utils.tap.core]


[6]

0 сек.

print(gtable.info)

<Table length=2575>
      name        dtype  unit                                                                                               description                                                                                               n_bad
---------------- ------- ---- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -----
       source_id   int64                                                                                                    Gaia eDR3 unique source identifier. Note that this *cannot* be matched against the DR1 or DR2 source_ids.     0
              ra float64  deg                                                                                                                                                                    ICRS right ascension from Gaia eDR3.     0
        parallax float32  mas                 Absolute barycentric stellar parallax of the source at the reference epoch J2016.0. If looking for a distance, consider joining with gedr3dist.main and using the distances from there.     0
             dec float64  deg                                                                                                                                                                        ICRS declination from Gaia eDR3.     0
 phot_g_mean_mag float32  mag               Mean magnitude in the G band. This is computed from the G-band mean flux applying the magnitude zero-point in the Vega scale. To obtain error estimates, see phot_g_mean_flux_over_error.     5
phot_bp_mean_mag float32  mag Mean magnitude in the integrated BP band. This is computed from the BP-band mean flux applying the magnitude zero-point in the Vega scale. To obtain error estimates, see phot_bp_mean_flux_over_error.    42
phot_rp_mean_mag float32  mag Mean magnitude in the integrated RP band. This is computed from the RP-band mean flux applying the magnitude zero-point in the Vega scale. To obtain error estimates, see phot_rp_mean_flux_over_error.    36

2575 stars are in about 25 parsecs since there is no G band or BP-RP band in photometry in some of the stars, I will plot a color magnitude star

[7]

0 сек.

bp_rp = gtable['phot_bp_mean_mag' ]-gtable['phot_rp_mean_mag']

fig, axcmd = plt.subplots(1,1, figsize = (7,7))

axcmd.hexbin(bp_rp, gtable['phot_g_mean_mag'], bins = 'log', mincnt=1)
axcmd.set_xlabel(r'$(G_\mathrm{BP}-G_\mathrm{RP})$')
axcmd.set_ylabel(r'$G$')
axcmd.invert_yaxis()

plt.show()

HR Diagram with the only difference in adding one line of code to the previous one so that the diagram would become tighter

[14]

bp_rp = gtable['phot_bp_mean_mag' ]-gtable['phot_rp_mean_mag']
abs_gmag = gtable['phot_g_mean_mag']+5*np.log10(gtable['parallax'])-10

fig, axcmd = plt.subplots(1,1, figsize = (7,7))

axcmd.hexbin(bp_rp, gtable['phot_g_mean_mag'], bins = 'log', mincnt=1)
axcmd.set_xlabel(r'$(G_\mathrm{BP}-G_\mathrm{RP})$')
axcmd.set_ylabel(r'$G$')
axcmd.invert_yaxis()
plt.show()

u/More-Independent-132 — 16 days ago

How to plot a colour-coded HR Diagram by spectral type

So, I want to create an HR Diagram for each spectral type, selecting one star from each spectral type (O, B, A, F, G, K, M). I got all the data I need from SIMBAD like parallaxes of each star, the B-V out of which I got the spectral types of each star. But, how do I plot it using Gaia in Python and also change the colour of each spectral type to make a distinction. I have created an HR Diagram below using this code, but what do I do when it comes to plotting an HR Diagram for specific stars, do I just include ra and dec of a specific star from Gaia into the job query or what and how do I combine all the stars to accommodate the whole HR Diagram? And how do I calculate the absolute magnitude, what distance do I include? of the parallax? Here's the code itself:

https://preview.redd.it/8vjdkoanqbhh1.png?width=2704&format=png&auto=webp&s=289fda72c11231a09c633e319a11ad868ec47aa7

https://preview.redd.it/8c5ash3qqbhh1.png?width=2624&format=png&auto=webp&s=2d9d913f5bd01328f4b1827301476e4530784fa4

https://preview.redd.it/vvgpss7rqbhh1.png?width=2640&format=png&auto=webp&s=6b9c6cd5c7fdb787525d81e875e5afd5055bd8e7

https://preview.redd.it/7blgy86vqbhh1.png?width=2670&format=png&auto=webp&s=9cc6f42c62642c5b7c3915e012d742bdbd29d7c5

reddit.com
u/More-Independent-132 — 16 days ago

Nasa ExoPlanet Archive error: ORA-00904: 'NAME': invalid identifier

I don't get it, I tried to create a table to then use it for cross-matching but for some reason it gives me this invalid identifier mistake even though the name of the identifier (Nasa ExoPlanet in this case) seems to be correct. My code:

from astroquery.ipac.nexsci.nasa_exoplanet_archive import NasaExoplanetArchive
exocolumns = ['pl_name', 'host-name', 'ra', 'dec', 'sy_gaiamag', 'st_teff', 'st_logg', 'st_met', 'st_lum', 'st_rad', 'st_age']
select_string = ",".join(exocolumns)
exotable = Table(NasaExoplanetArchive.query_criteria(table="pscomppars", select=select_string))

The error:

DALQueryError: ORA-00904: 'NAME': invalid identifier

During handling of the above exception, another exception occurred:

InvalidQueryError Traceback (most recent call last)

/usr/local/lib/python3.12/dist-packages/astroquery/ipac/nexsci/nasa_exoplanet_archive/core.py in query_criteria_async(self, table, get_query_payload, cache, **criteria)
245
response = tap.search(query=tap_query, language='ADQL') # Note that this returns a VOTable
246
except Exception as err:
--> 247 raise InvalidQueryError(str(err))
248
else:
249
if get_query_payload:

InvalidQueryError: ORA-00904: 'NAME': invalid identifier

the error points to the third line, so I guess it’s because of the name of NasaExoplanetArchive.query

reddit.com
u/More-Independent-132 — 20 days ago

Why am I getting an error: invalid syntax. Perhaps you forgot a comma?

Why am I getting an error here:

job = Gaia.launch_job_async(" SELECT source_id, ra, parallax, dec, gmag_gunn, rmag_gunn, imag_gunn, zmag_gunn \
                            FROM external.gaiaedr3_gcns_main_1 \
                            WHERE parallax>50" \
                            , dump_to_file=True, name= 'GcnsTwentyParsec_sdss', output format = 'fits')
gtable_sdss = job.get_results()

Error:

, dump_to_file=True, name= 'GcnsTwentyParsec_sdss',output format = 'fits')
^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

reddit.com
u/More-Independent-132 — 21 days ago

TypeError: array([2, 5, 7]) is not a callable object. What to do?

I am trying to learn Python by completing a tutorial, specifically I am trying to make a Gaussian function. I tried to search it up on the internet and on one website, they advised to change the name of the variable but it didn't change the error. It is still there. Please help, what do I do? This is the website that I've used to try to make my Gaussian function: https://education.molssi.org/python-data-analysis/03-data-fitting/index.html

Here's my code below:

z = [2,5,7]

y = [9,0,-1]

z = np.asarray(z)

y = np.asarray(y)

def Gauss (z,A, B):

y = A*np.exp(-1*B*x**2)

return y

parameters, covariance = curve_fit(x, y, Gauss)

fit_A = parameters[2]

fit_B = parameters[0]

fit_y = Gauss(z, fit_A, fit_B)

plt.scatter(z, y, label = 'Gauss')

plt.scatter(z, fit_y, color = 'lightcoral')

plt.legend()

And this is the error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[71], line 8
      4 
      5 
def
 Gauss (z,A, B):
      6     y = A*np.exp(-1*B*x**2)
      7     
return
 y
----> 8 parameters, covariance = curve_fit(x, y, Gauss)
      9 fit_A = parameters[2]
     10 fit_B = parameters[0]
     11 fit_y = Gauss(z, fit_A, fit_B)

File /Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/scipy/optimize/_minpack_py.py:907, in curve_fit(f, xdata, ydata, p0, sigma, absolute_sigma, check_finite, bounds, method, jac, full_output, nan_policy, **kwargs)
    594 """
    595 Use non-linear least squares to fit a function, f, to data.
    596 
   (...)    903 array([5.00000000e+05, 1.00000000e-02, 1.49999999e+01])
    904 """
    905 
if
 p0 
is
 
None
:
    906     # determine number of parameters by inspecting the function
--> 907     sig = _getfullargspec(f)
    908     args = sig.args
    909     
if
 len(args) < 2:

File /Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/scipy/_lib/_util.py:487, in getfullargspec_no_self(func)
    466 
def
 getfullargspec_no_self(func):
    467     """inspect.getfullargspec replacement using inspect.signature.
    468 
    469     If func is a bound method, do not list the 'self' parameter.
   (...)    485 
    486     """
--> 487     sig = wrapped_inspect_signature(func)
    488     args = [
    489         p.name 
for
 p 
in
 sig.parameters.values()
    490         
if
 p.kind 
in
 [inspect.Parameter.POSITIONAL_OR_KEYWORD,
    491                       inspect.Parameter.POSITIONAL_ONLY]
    492     ]
    493     varargs = [
    494         p.name 
for
 p 
in
 sig.parameters.values()
    495         
if
 p.kind == inspect.Parameter.VAR_POSITIONAL
    496     ]

File /Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/scipy/_lib/_util.py:44, in wrapped_inspect_signature(callable)
     42 
def
 wrapped_inspect_signature(callable):
     43     """Get a signature object for the passed callable."""
---> 44     
return
 inspect.signature(callable,
     45                              annotation_format=annotationlib.Format.FORWARDREF)

File /Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/inspect.py:3323, in signature(obj, follow_wrapped, globals, locals, eval_str, annotation_format)
   3320 
def
 signature(obj, *, follow_wrapped=
True
, globals=
None
, locals=
None
, eval_str=
False
,
   3321               annotation_format=Format.VALUE):
   3322     """Get a signature object for the passed callable."""
-> 3323     
return
 Signature.from_callable(obj, follow_wrapped=follow_wrapped,
   3324                                    globals=globals, locals=locals, eval_str=eval_str,
   3325                                    annotation_format=annotation_format)

File /Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/inspect.py:3038, in Signature.from_callable(cls, obj, follow_wrapped, globals, locals, eval_str, annotation_format)
   3033 u/classmethod
   3034 
def
 from_callable(cls, obj, *,
   3035                   follow_wrapped=
True
, globals=
None
, locals=
None
, eval_str=
False
,
   3036                   annotation_format=Format.VALUE):
   3037     """Constructs Signature for the given callable object."""
-> 3038     
return
 _signature_from_callable(obj, sigcls=cls,
   3039                                     follow_wrapper_chains=follow_wrapped,
   3040                                     globals=globals, locals=locals, eval_str=eval_str,
   3041                                     annotation_format=annotation_format)

File /Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/inspect.py:2436, in _signature_from_callable(obj, follow_wrapper_chains, skip_bound_arg, globals, locals, eval_str, sigcls, annotation_format)
   2426 _get_signature_of = functools.partial(_signature_from_callable,
   2427                             follow_wrapper_chains=follow_wrapper_chains,
   2428                             skip_bound_arg=skip_bound_arg,
   (...)   2432                             eval_str=eval_str,
   2433                             annotation_format=annotation_format)
   2435 
if
 
not
 callable(obj):
-> 2436     
raise
 
TypeError
('
{!r}
 is not a callable object'.format(obj))
   2438 
if
 isinstance(obj, types.MethodType):
   2439     # In this case we skip the first parameter of the underlying
   2440     # function (usually `self` or `cls`).
   2441     sig = _get_signature_of(obj.__func__)

TypeError: array([2, 5, 7]) is not a callable object
reddit.com
u/More-Independent-132 — 30 days ago
▲ 1 r/IBO

What EE subject should I choose?

I’m an M28 and these are my subjects: 1)English A Lang & Lit HL 2) Spanish B SL 3) Physics HL 4) Math AA HL 5) Economics HL 6) Business Management SL

I’ve read on Reddit that just purely based on statistics, it is the Language A subjects that tend to have the highest grade in EE. But, my school also offers a combination of two subjects to be incorporated in the EE. So what should I choose? I am very passionate about Physics but I’m afraid it will take too much time and will be arduous to complete.

reddit.com
u/More-Independent-132 — 2 months ago
▲ 8 r/IBO

Is my IB subject selection choice any good?

I am an M28, starting IBDP soon. I’m sure that I want to become an electrical engineer by like 60% but I want to keep options open as I’m also considering going for international relations or economics or a double major. My uni priority is T-100 US universities and safeties in Europe like Netherlands, Hungary and also perhaps I wanna apply to US unis abroad like NYUAD or Duke Khanshasa in China. Here is my current subject selection choice:

  1. English A Language and Literature HL
  2. Spanish B SL (my school doesn’t offer it but they gave me an option of hiring a tutor myself and study with a tutor online, not Pamoja)
  3. Economics HL
  4. Physics HL
  5. Math AA HL
  6. Bus Man SL

I am taking four HLs but it’s only because my English A teacher told me that there is no difference between the content of HL and SL and after the mocks in the end of DP1, I could switch to SL in DP2.

My school is also considering offering new subjects next year like History or Global Politics but I’m still unsure whether they will be implemented. However, I am very much passionate about both politics and history. Furthermore, I was considering taking History SL instead of Bus Man SL; however, after reading on Reddit how hard History actually is and how little difference there is between SL and HL, I consolidated on Bus Man SL.

Any advice, changes? Will I be able to cope with Math AA HL and Physics HL? I am passionate about Physics but not that much about Math AA. Nonetheless, I finished MYP5 very well with 5 7s and the rest are 6s with Physics being one of the subject where I got a 7, whereas Maths was a 6.

Thanks!

reddit.com
u/More-Independent-132 — 2 months ago