def extract_features_from_images(image_path, file_name):
    '''
    Changing results path for processing a single day of images 
    '''
    feat_results = []
    
    print "get active region map..."
    image, hdu= get_active_region_map(image_path, file_name)

    print "save image data to picke file..."
    #trans_image_path = "/Users/Alexander/NASA/trans_image_data_test/"
    trans_image_path = "/Users/Alexander/NASA/trans_image_data_singleDay/"
    save_to_file(image, trans_image_path, file_name)
    
    # Now we want to separate the  active regions in the image
    # Generate the markers as local maxima of the distance to the background
    print "identify active regions in image for file"
    labels = get_active_region_labels(image)

    # extract features from image
    print "extract features from image"
    extract_results = extract_features(labels,image, hdu, file_name)
    #feat_results.append((file_name, extract_results))

    print "saving extracted features to pickle file from image"
    #feature_results_path = "/Users/Alexander/NASA/feature_extraction_results_test/"
    feature_results_path = "/Users/Alexander/NASA/feature_extraction_results_singleDay/"

    #save_to_file((file_name, extract_results), feature_results_path, file_name)
    save_to_file([file_name, extract_results], feature_results_path, file_name)
def extract_features_from_images(image_path, file_name, mdi_flux_filter = 120, hmi_flux_filter = 90, kernal_std = 8,num_pixel_in_active_region = 100):
	'''
	Changing results path for processing a single day of images 
	INPUT: image_path, string
		   file_name, string
		   mdi_flux_filter (int) is passed into get_active_region_map 
		   hmi_flux_filter (int) is passed into get_active_region_map 
		   kernal_std (int) is passed into get_active_region_map
	'''

	
	print "get active region map..."
	image, hdu= get_active_region_map(image_path, file_name,  mdi_flux_filter , hmi_flux_filter, kernal_std)

	# print "save image data to picke file..."
	# save_to_file(image, trans_image_path, file_name)
	
	# Now we want to separate the  active regions in the image
	# Generate the markers as local maxima of the distance to the background
	print "identify active regions in image for file"
	labels = get_active_region_labels(image)

	# extract features from image
	print "extract features from image"
	extract_results = extract_features(labels, image, hdu, file_name, num_pixel_in_active_region)

	new_feat_objects = extract_image_features.map_centroids_long_lat(extract_results)

	return new_feat_objects