#NEWLINE# def select_step_degree( dv ) : #NEWLINE# #INDENT# if ( dv > ( 1.0 * u . arcsec ) ) : #NEWLINE# #INDENT# degree_limits_ = [ 1.5 , 3 , 7 , 13 , 20 , 40 , 70 , 120 , 270 , 520 ] #NEWLINE# degree_steps_ = [ 1 , 2 , 5 , 10 , 15 , 30 , 45 , 90 , 180 , 360 ] #NEWLINE# degree_units = ( [ u . degree ] * len ( degree_steps_ ) ) #NEWLINE# minsec_limits_ = [ 1.5 , 2.5 , 3.5 , 8 , 11 , 18 , 25 , 45 ] #NEWLINE# minsec_steps_ = [ 1 , 2 , 3 , 5 , 10 , 15 , 20 , 30 ] #NEWLINE# minute_limits_ = ( np . array ( minsec_limits_ ) / 60.0 ) #NEWLINE# minute_units = ( [ u . arcmin ] * len ( minute_limits_ ) ) #NEWLINE# second_limits_ = ( np . array ( minsec_limits_ ) / 3600.0 ) #NEWLINE# second_units = ( [ u . arcsec ] * len ( second_limits_ ) ) #NEWLINE# degree_limits = np . concatenate ( [ second_limits_ , minute_limits_ , degree_limits_ ] ) #NEWLINE# degree_steps = ( ( minsec_steps_ + degree_limits_ ) + degree_steps_ ) #NEWLINE# degree_units = ( ( second_units + minute_units ) + degree_units ) #NEWLINE# n = degree_limits . searchsorted ( dv . to ( u . degree ) ) #NEWLINE# step = degree_steps [ n ] #NEWLINE# unit = degree_units [ n ] #NEWLINE# return ( step * unit ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( select_step_scalar ( dv . to ( u . arcsec ) . value ) * u . arcsec )