@@ -478,7 +478,7 @@ class = 'galaxy' \
478478 def get_spectra_async (self , coordinates = None , radius = 2. * u .arcsec ,
479479 matches = None , plate = None , fiberID = None , mjd = None ,
480480 timeout = TIMEOUT , get_query_payload = False ,
481- data_release = 12 , cache = True ):
481+ data_release = 12 , cache = True , show_progress = True ):
482482 """
483483 Download spectrum from SDSS.
484484
@@ -590,14 +590,16 @@ def get_spectra_async(self, coordinates=None, radius=2. * u.arcsec,
590590
591591 results .append (commons .FileContainer (link ,
592592 encoding = 'binary' ,
593- remote_timeout = timeout ))
593+ remote_timeout = timeout ,
594+ show_progress = show_progress ))
594595
595596 return results
596597
597598 @prepend_docstr_noreturns (get_spectra_async .__doc__ )
598599 def get_spectra (self , coordinates = None , radius = 2. * u .arcsec ,
599600 matches = None , plate = None , fiberID = None , mjd = None ,
600- timeout = TIMEOUT , cache = True , data_release = 12 ):
601+ timeout = TIMEOUT , cache = True , data_release = 12 ,
602+ show_progress = True ):
601603 """
602604 Returns
603605 -------
@@ -609,7 +611,8 @@ def get_spectra(self, coordinates=None, radius=2. * u.arcsec,
609611 radius = radius , matches = matches ,
610612 plate = plate , fiberID = fiberID ,
611613 mjd = mjd , timeout = timeout ,
612- data_release = data_release )
614+ data_release = data_release ,
615+ show_progress = show_progress )
613616
614617 if readable_objs is not None :
615618 if isinstance (readable_objs , dict ):
@@ -620,7 +623,8 @@ def get_spectra(self, coordinates=None, radius=2. * u.arcsec,
620623 def get_images_async (self , coordinates = None , radius = 2. * u .arcsec ,
621624 matches = None , run = None , rerun = 301 , camcol = None ,
622625 field = None , band = 'g' , timeout = TIMEOUT ,
623- get_query_payload = False , cache = True , data_release = 12 ):
626+ get_query_payload = False , cache = True , data_release = 12 ,
627+ show_progress = True ):
624628 """
625629 Download an image from SDSS.
626630
@@ -730,18 +734,18 @@ def get_images_async(self, coordinates=None, radius=2. * u.arcsec,
730734 rerun = row ['rerun' ], camcol = row ['camcol' ],
731735 field = row ['field' ], band = b )
732736
733- results .append (commons .FileContainer (link ,
734- encoding = 'binary' ,
735- remote_timeout = timeout ,
736- cache = cache ))
737+ results .append (commons .FileContainer (
738+ link , encoding = 'binary' , remote_timeout = timeout ,
739+ cache = cache , show_progress = show_progress ))
737740
738741 return results
739742
740743 @prepend_docstr_noreturns (get_images_async .__doc__ )
741744 def get_images (self , coordinates = None , radius = 2. * u .arcsec ,
742745 matches = None , run = None , rerun = 301 , camcol = None , field = None ,
743746 band = 'g' , timeout = TIMEOUT , cache = True ,
744- get_query_payload = False , data_release = 12 ):
747+ get_query_payload = False , data_release = 12 ,
748+ show_progress = True ):
745749 """
746750 Returns
747751 -------
@@ -752,15 +756,17 @@ def get_images(self, coordinates=None, radius=2. * u.arcsec,
752756 readable_objs = self .get_images_async (
753757 coordinates = coordinates , radius = radius , matches = matches , run = run ,
754758 rerun = rerun , data_release = data_release , camcol = camcol , field = field ,
755- band = band , timeout = timeout , get_query_payload = get_query_payload )
759+ band = band , timeout = timeout , get_query_payload = get_query_payload ,
760+ show_progress = show_progress )
756761
757762 if readable_objs is not None :
758763 if isinstance (readable_objs , dict ):
759764 return readable_objs
760765 else :
761766 return [obj .get_fits () for obj in readable_objs ]
762767
763- def get_spectral_template_async (self , kind = 'qso' , timeout = TIMEOUT ):
768+ def get_spectral_template_async (self , kind = 'qso' , timeout = TIMEOUT ,
769+ show_progress = True ):
764770 """
765771 Download spectral templates from SDSS DR-2.
766772
@@ -806,21 +812,23 @@ def get_spectral_template_async(self, kind='qso', timeout=TIMEOUT):
806812 link = '%s-%s.fit' % (self .TEMPLATES_URL , name )
807813 results .append (commons .FileContainer (link ,
808814 remote_timeout = timeout ,
809- encoding = 'binary' ))
815+ encoding = 'binary' ,
816+ show_progress = show_progress ))
810817
811818 return results
812819
813820 @prepend_docstr_noreturns (get_spectral_template_async .__doc__ )
814- def get_spectral_template (self , kind = 'qso' , timeout = TIMEOUT ):
821+ def get_spectral_template (self , kind = 'qso' , timeout = TIMEOUT ,
822+ show_progress = True ):
815823 """
816824 Returns
817825 -------
818826 list : List of `~astropy.io.fits.HDUList` objects.
819827
820828 """
821829
822- readable_objs = self .get_spectral_template_async (kind = kind ,
823- timeout = timeout )
830+ readable_objs = self .get_spectral_template_async (
831+ kind = kind , timeout = timeout , show_progress = show_progress )
824832
825833 if readable_objs is not None :
826834 return [obj .get_fits () for obj in readable_objs ]
0 commit comments